From 1ed17e6064d94337733c6bccefcbd66c9459694b Mon Sep 17 00:00:00 2001 From: Thibault Jouan Date: Thu, 19 Dec 2013 23:17:03 +0000 Subject: [PATCH] Fix Condition#! specs --- spec/producer/core/condition_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/producer/core/condition_spec.rb b/spec/producer/core/condition_spec.rb index 912f2fd..110c427 100644 --- a/spec/producer/core/condition_spec.rb +++ b/spec/producer/core/condition_spec.rb @@ -84,8 +84,10 @@ module Producer::Core end describe '#!' do - %w[true false].each do |b| + [true, false].each do |b| context "when #met? return #{b}" do + before { allow(condition).to receive(:met?) { b } } + it 'returns the negated #met?' do expect(condition.!).to be !condition.met? end