-
-
Save bil-bas/5326055 to your computer and use it in GitHub Desktop.
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
def foo1 obj | |
obj.bar(1) | |
obj.bar(2) | |
end | |
def foo2 obj | |
obj.bar(2) | |
end | |
describe "foo1" do | |
it "calls bar on obj" do | |
obj = mock | |
obj.should_receive(:bar).with(2) | |
obj.should_receive(:bar).with(anything()).any_number_of_times | |
foo1 obj | |
end | |
end | |
describe "foo2" do | |
it "calls bar on obj" do | |
obj = mock | |
obj.should_receive(:bar).with(2) | |
obj.should_receive(:bar).with(anything()).any_number_of_times | |
foo2 obj | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment