Browse files

Fixing issue #44

  • Loading branch information...
1 parent ef127a5 commit ff92bb7612837688ad309cac2e9e53acaa74e978 @kaiwren kaiwren committed Mar 23, 2011
Showing with 1 addition and 2 deletions.
  1. +1 −2 spec/rspec/mocks/nil_expectation_warning_spec.rb
View
3 spec/rspec/mocks/nil_expectation_warning_spec.rb
@@ -13,9 +13,8 @@ module RSpec
module Mocks
describe "an expectation set on nil" do
-
it "issues a warning with file and line number information" do
- expected_warning = %r%An expectation of :foo was set on nil. Called from #{__FILE__}:#{__LINE__+3}(:in `block \(2 levels\) in <module:Mocks>')?. Use allow_message_expectations_on_nil to disable warnings.%
+ expected_warning = %r%An expectation of :foo was set on nil. Called from #{__FILE__}:#{__LINE__+3}(:in .+)?. Use allow_message_expectations_on_nil to disable warnings.%
Kernel.should_receive(:warn).with(expected_warning)
nil.should_receive(:foo)

0 comments on commit ff92bb7

Please sign in to comment.