Sha256: 7464427fd7c7998050a18b54a97088a93f81f5467c5df9ffdffca94160a353af
Contents?: true
Size: 911 Bytes
Versions: 14
Compression:
Stored size: 911 Bytes
Contents
require File.join(File.dirname(__FILE__), "../../spec_helper") include Nudge describe BoolRandomInstruction do it_should_behave_like "every Nudge Instruction" before(:each) do @context = Interpreter.new @i1 = BoolRandomInstruction.new(@context) end describe "\#go" do before(:each) do @i1 = BoolRandomInstruction.new(@context) @context.clear_stacks end describe "\#cleanup" do it "should invoke Type#any_value" do @context.clear_stacks BoolType.should_receive(:any_value) @i1.go end it "should have a created a new instance of the right type and pushed it" do @context.clear_stacks @i1.go @context.stacks[:bool].depth.should == 1 result = @context.stacks[:bool].peek result.value.should_not == nil result.type.should == :bool end end end end
Version data entries
14 entries across 14 versions & 1 rubygems