Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make name of sample exception a bit more clear as to its purpose

  • Loading branch information...
commit b92f2cc52d469d10864f9cd767c7e163b05da595 1 parent 6fe4168
@coreyhaines coreyhaines authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 spec/rspec/mocks/mock_spec.rb
View
6 spec/rspec/mocks/mock_spec.rb
@@ -217,15 +217,15 @@ def @mock.method_with_default_argument(arg={}); end
end
it "fails with nice message if passed Exception requires constructor arguments" do
- class FancyError < RuntimeError
+ class ErrorThatHasAConstructorTakingArguments < RuntimeError
def initialize(i_take_an_argument)
end
end
- @mock.should_receive(:something).and_raise(FancyError)
+ @mock.should_receive(:something).and_raise(ErrorThatHasAConstructorTakingArguments)
lambda {
@mock.something
- }.should raise_error(ArgumentError, "Errors raised by expectations cannot have constructors that take arguments. RSpec::Mocks::FancyError has a constructor requiring 1.")
+ }.should raise_error(ArgumentError, "Errors raised by expectations cannot have constructors that take arguments. RSpec::Mocks::ErrorThatHasAConstructorTakingArguments has a constructor requiring 1.")
end
it "raises RuntimeError with passed message" do
Please sign in to comment.
Something went wrong with that request. Please try again.