From 20f525189e89733a4202230cf753c5f4245dd54f Mon Sep 17 00:00:00 2001 From: "Josep M. Bach" Date: Fri, 15 Oct 2010 12:00:17 +0200 Subject: [PATCH] 15719 already fixed in stubbed_message_expectations_spec.rb --- spec/rspec/mocks/bug_report_15719_spec.rb | 29 ----------------------- 1 file changed, 29 deletions(-) delete mode 100644 spec/rspec/mocks/bug_report_15719_spec.rb diff --git a/spec/rspec/mocks/bug_report_15719_spec.rb b/spec/rspec/mocks/bug_report_15719_spec.rb deleted file mode 100644 index 749064286..000000000 --- a/spec/rspec/mocks/bug_report_15719_spec.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'spec_helper' - -module RSpec - module Mocks - describe "mock failure" do - - it "tells you when it receives the right message with the wrong args" do - double = double("foo") - double.should_receive(:bar).with("message") - lambda { - double.bar("different message") - }.should raise_error(RSpec::Mocks::MockExpectationError, %Q{Double "foo" received :bar with unexpected arguments\n expected: ("message")\n got: ("different message")}) - double.rspec_reset # so the example doesn't fail - end - - pending "tells you when it receives the right message with the wrong args if you stub the method (fix bug 15719)" do - # NOTE - for whatever reason, if you use a the block style of pending here, - # rcov gets unhappy. Don't know why yet. - double = double("foo") - double.stub(:bar) - double.should_receive(:bar).with("message") - lambda { - double.bar("different message") - }.should raise_error(RSpec::Mocks::MockExpectationError, %Q{Double 'foo' expected :bar with ("message") but received it with ("different message")}) - double.rspec_reset # so the example doesn't fail - end - end - end -end