Created
March 13, 2009 09:38
-
-
Save goosmurf/78506 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
describe "test" do | |
it "should return and then raise error" do | |
mock = mock("Test") | |
crazy = 0 | |
mock.should_receive(:blah).twice do | |
if crazy > 0 | |
raise StandardError | |
end | |
crazy += 1 | |
end | |
puts mock.blah | |
lambda { mock.blah }.should raise_error(StandardError) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment