search for: stackemptyerror

Displaying 1 result from an estimated 1 matches for "stackemptyerror".

2008 Jan 11
13
Role of stories vs specs, revisited
...n to organize them around context, or the fixture used. This leads to specs that look like describe Stack, "empty" do it "should be empty" do Stack.new.should be_empty end it "should blow up when sent pop" do lambda { Stack.new.pop }.should raise_error(StackEmptyError) end end describe Stack, "with one item" do before(:each) do @stack = Stack.new @stack.push :foo end it "should not be empty" do @stack.should_not be_empty end it "should return the item when sent pop" do @stack.pop.should == :foo end e...