Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require File.dirname(__FILE__) + '/spec_helper'
- ARR = []
- given "A" do
- ARR << 1
- end
- given "B", :given => "A" do
- ARR << 2
- end
- given "C", :given => "B" do
- ARR << 3
- end
- describe "Chaining calls to 'given'", :given => "C" do
- it "should behave like 'standard' constructor calls" do
- ARR.should == [1,2,3]
- end
- end
- # PRINTS:
- # mungo:~/projects/merb_resource_controller snusnu$ spec spec/given_spec.rb
- # Chaining calls to 'given'
- # - should behave like 'standard' constructor calls (FAILED - 1)
- #
- # 1)
- # 'Chaining calls to 'given' should behave like 'standard' constructor calls' FAILED
- # expected: [1, 2, 3],
- # got: [3] (using ==)
- # ./spec/given_spec.rb:20:
- #
- # Finished in 0.015374 seconds
- #
- # 1 example, 1 failure
Add Comment
Please, Sign In to add comment