-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base class for ExpectationError makes it hard for tests to fail #428
Comments
i think i know what you mean, but could you provide a spec describing the problem? |
I'll give it a shot. I have the repo cloned on my machine. I figured I'd start by running the existing tests. I'm getting some failures that I don't understand, both because my disk isn't full and because I'm running on OS X. Any ideas? $ bundle install Failures:
Finished in 10.01 seconds Failed examples: rspec ./spec/integration/stockquote_example_spec.rb:5 # Stockquote example returns the result in a CDATA tag Randomized with seed 34968 |
I think I've got it. I added this to spec/savon/mock_spec.rb: it "allows code to rescue Savon::Error and still report test failures" do
end |
fixed on master. this will be released with v2.2.0. |
I've got code in production that basically does
Unfortunately, if a test fails that I set up with
Savon::SpecHelper
, it raises aSavon::ExpectationError
which inherits fromSavon::Error
so I never see the test failure.The idea of checking for
Savon::ExpectationError
in production code feels unsavory. What do you think about changingSavon::ExpectationError
to inherit from::Exception
instead?The text was updated successfully, but these errors were encountered: