Skip to content

Commit

Permalink
Add invariant to stack example
Browse files Browse the repository at this point in the history
  • Loading branch information
jimweirich committed Aug 28, 2012
1 parent 04d3a7a commit 4606988
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/stack/stack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def stack_with(initial_contents)
end

Given(:stack) { stack_with(initial_contents) }
Invariant { stack.empty?.should == (stack.depth == 0) }

context "when empty" do
Given(:initial_contents) { [] }
Expand Down

0 comments on commit 4606988

Please sign in to comment.