Skip to content

Commit

Permalink
Not so dependent on a particular ruby implementation. Closes #44 Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwren authored and justinko committed Mar 23, 2011
1 parent ef127a5 commit 8e2c1a2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions spec/rspec/mocks/nil_expectation_warning_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8e2c1a2

Please sign in to comment.