Browse files

15719 already fixed in stubbed_message_expectations_spec.rb

- Closes #26.
  • Loading branch information...
1 parent a00ec86 commit e85bfe1caa5100482a7b60fc18e139bc4dabdbf0 @txus txus committed with dchelimsky Oct 15, 2010
Showing with 0 additions and 29 deletions.
  1. +0 −29 spec/rspec/mocks/bug_report_15719_spec.rb
View
29 spec/rspec/mocks/bug_report_15719_spec.rb
@@ -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

0 comments on commit e85bfe1

Please sign in to comment.