spec/integration/requirement_reflection_spec.rb in davidlee-state-fu-0.2.0 vs spec/integration/requirement_reflection_spec.rb in davidlee-state-fu-0.3.1
- old
+ new
@@ -48,19 +48,19 @@
end # before
describe "transition.valid? / transition.requirements_met?" do
it "should be true if all requirements are met (return truth)" do
@obj.state_fu.next_states[:moon].entry_requirements.should == [:spacesuit?]
- @obj.state_fu.evaluate_requirement(:spacesuit?).should == true
+ @obj.state_fu.evaluate_requirement_with_args(:spacesuit?).should == true
@obj.fly_spaceship?(:moon).should == true
@obj.fly_spaceship(:moon).requirements_met?.should == true
@obj.fly_spaceship(:moon).should be_valid
end
it "should be false if not all requirements are met" do
stub( @obj ).spacesuit?() { false }
@obj.state_fu.next_states[:moon].entry_requirements.should == [:spacesuit?]
- @obj.state_fu.evaluate_requirement(:spacesuit?).should == false
+ @obj.state_fu.evaluate_requirement_with_args(:spacesuit?).should == false
@obj.fly_spaceship?(:moon).should == false
@obj.fly_spaceship(:moon).requirements_met?.should == false
@obj.fly_spaceship(:moon).should_not be_valid
end
end