#457 √ resolved
Arthur Schreiber

PositiveOperatorMatcher and NegativeOperatorMatcher fail when #send is overwritten

Reported by Arthur Schreiber | July 3rd, 2008 @ 11:38 PM | in No-Milestone-Assigned

PositiveOperatorMatcher and NegativeOperatorMatcher should use #_-send__ instead of #send internally, as there are some classes (e.g. Socket), that overwrite #send with custom behaviour, which RSpec does not like.

Here is an example:

describe "An Object redefining #send" do
  before(:each) do
    class << (@obj = Object.new)
      def send(*args)
        0
      end
    end
  end

  it "should not make basic matchers fail" do
    @obj.should_not == nil
  end
end

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Behaviour Driven Development for Ruby.

Shared Ticket Bins

People watching this ticket