spec/interpreter/interpreter_spec.rb in nudge-0.1.1 vs spec/interpreter/interpreter_spec.rb in nudge-0.1.2

- old
+ new

@@ -403,13 +403,13 @@ myCode = "block {}" @ii.reset(myCode) lambda{3.times {@ii.step}}.should_not raise_error end - it "should step only until the stepLimit has not been reached, if the :exec stack is full" do + it "should step only until the step_limit has not been reached, if the :exec stack is full" do myCode = "block {"*20 + "}"*20 - @ii.stepLimit = 3 + @ii.step_limit = 3 @ii.reset(myCode) lambda{15.times {@ii.step}}.should_not raise_error end it "should count how many steps are executed" do @@ -429,12 +429,12 @@ @ii.clear_stacks myCode = "block {"*20 + "}"*20 @ii.reset(myCode) end - it "should run until the stepLimit has been reached, if the :exec stack isn't empty" do - @ii.stepLimit = 9 + it "should run until the step_limit has been reached, if the :exec stack isn't empty" do + @ii.step_limit = 9 @ii.run @ii.steps.should == 9 end it "should run until the :exec stack is empty (if the PointLimit has not been reached)" do @@ -447,13 +447,16 @@ puts @ii.stacks[:exec].depth @ii.run @ii.steps.should == 0 end - it "should #fire_all_sensors at the end of running" do + it "should #fire_all_sensors at the end of running if any are defined" do + @ii.register_sensor("y") @ii.should_receive(:fire_all_sensors) @ii.run end + + it "should return Stack#inspect for all its stacks if no sensors are defined" end describe "resetting" do it "should clear the steps" do \ No newline at end of file