Created
January 9, 2012 17:06
-
-
Save sw17ch/1583907 to your computer and use it in GitHub Desktop.
is this kosher?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "thing" do | |
before do | |
@obj_1 = Object.new | |
@obj_2 = Object.new | |
stub(@obj_1).foo { puts "stubbed foo (1)" } | |
stub(@obj_2).foo { puts "stubbed foo (2)" } | |
end | |
it "1 does things" do | |
mock(@obj_1).foo { puts "mocked foo (1)" } | |
@obj_1.foo | |
@obj_2.foo | |
end | |
it "2 does things" do | |
mock(@obj_2).foo { puts "mocked foo (2)" } | |
@obj_1.foo | |
@obj_2.foo | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment