Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

alias_method raise_exception to raise_error

  • Loading branch information...
commit a8b21c0dda57e15e802ecdb6d4405c2c857c7de1 1 parent 7205eaa
@justinko authored
View
1  lib/rspec/matchers/raise_error.rb
@@ -125,5 +125,6 @@ def negative_expectation?
def raise_error(error=Exception, message=nil, &block)
Matchers::RaiseError.new(error, message, &block)
end
+ alias_method :raise_exception, :raise_error
end
end
View
6 spec/rspec/matchers/raise_error_spec.rb
@@ -12,6 +12,12 @@
end
end
+describe "raise_exception aliased to raise_error" do
+ it "should pass if anything is raised" do
+ lambda {raise}.should raise_exception
+ end
+end
+
describe "should raise_error {|err| ... }" do
it "passes if there is an error" do
ran = false
Please sign in to comment.
Something went wrong with that request. Please try again.