Skip to content

Commit

Permalink
Fix warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
tomykaira committed May 9, 2013
1 parent 3d76bea commit 9a9b0f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rspec/matchers/built_in/raise_error.rb
Expand Up @@ -25,7 +25,7 @@ def matches?(given_proc, negative_expectation = false)
@eval_block = false
@eval_block_passed = false
unless given_proc.respond_to?(:call)
::Kernel.warn "`raise_error` is called with non-proc object"
::Kernel.warn "`raise_error` was called with non-proc object #{given_proc.inspect}"
return false
end
begin
Expand Down
2 changes: 1 addition & 1 deletion spec/rspec/matchers/raise_error_spec.rb
Expand Up @@ -431,7 +431,7 @@

describe "misuse of raise_error, with (), not {}" do
it "fails with warning" do
::Kernel.should_receive(:warn).with "`raise_error` is called with non-proc object"
::Kernel.should_receive(:warn).with /`raise_error` was called with non-proc object 1\.7/
expect {
expect(Math.sqrt(3)).to raise_error
}.to fail_with(/nothing was raised/)
Expand Down

0 comments on commit 9a9b0f4

Please sign in to comment.