doc/src/tutorials/stack_spec.rb in rspec-0.5.4 vs doc/src/tutorials/stack_spec.rb in rspec-0.5.5
- old
+ new
@@ -2,40 +2,24 @@
context "A new stack" do
setup do
@stack = Stack.new
end
-
specify "should be empty" do
@stack.should_be_empty
end
end
-context "An empty stack" do
- setup do
- @stack = Stack.new
- end
-
- specify "should keep its mouth shut when you send it 'push'" do
- lambda { @stack.push Object.new }.should.not.raise
- end
-end
-
context "A stack with one item" do
setup do
@stack = Stack.new
@stack.push "one item"
end
- specify "should not be empty" do
- @stack.should_not_be_empty
- end
-
specify "should return top when you send it 'top'" do
@stack.top.should_equal "one item"
end
- specify "should not be empty after 'top'" do
- @stack.top
+ specify "should not be empty" do
@stack.should_not_be_empty
end
-end
+end
\ No newline at end of file