spec/interpreter/interpreter_spec.rb in nudge-0.1.2 vs spec/interpreter/interpreter_spec.rb in nudge-0.1.3
- old
+ new
@@ -63,12 +63,12 @@
whatGotPushed.contents[1].name.should == "bar"
whatGotPushed.contents[2].contents[0].name.should == "baz"
end
it "should accept a blueprint, which should default to an empty string" do
- Interpreter.new(program:"value «int» \n«int» 7").program.should == "value «int» \n«int» 7"
- # Interpreter.new().program.should == ""
+ Interpreter.new("value «int» \n«int» 7").program.should == "value «int» \n«int» 7"
+ Interpreter.new().program.should == nil
end
it "should have an #enable method that works for Instructions, adding them to the #instructions hash" do
@ii.disable_all_instructions
@ii.instructions_library.should == {}
@@ -442,11 +442,10 @@
@ii.steps.should == 20
end
it "should do nothing if the :exec stack starts empty" do
@ii.reset()
- puts @ii.stacks[:exec].depth
@ii.run
@ii.steps.should == 0
end
it "should #fire_all_sensors at the end of running if any are defined" do
@@ -459,11 +458,11 @@
end
describe "resetting" do
it "should clear the steps" do
- ii = Interpreter.new(program:"block {ref a ref b}")
+ ii = Interpreter.new("block {ref a ref b}")
ii.run
ii.steps.should == 3
ii.reset
ii.steps.should == 0
end
@@ -482,10 +481,10 @@
ii.reset
ii.stacks[:foo].depth.should == 0
end
it "should clear the program, if none is given" do
- ii = Interpreter.new(program:"block {}")
+ ii = Interpreter.new("block {}")
ii.reset
ii.program.should == nil
end
it "should not affect variable bindings" do
\ No newline at end of file