satisfy conflict with rspec2 #49

tight opened this Issue Dec 10, 2010 · 3 comments

3 participants


rr's satisfy wildcard matchers conflicts with rspec2's one

In order to use rr's satisfy, you can just add a method in RR::Adapters::RRMethods :
module RR::Adapters::RRMethods
def rrsatisfy(&block)

You can now use
mock(object).foobar(rrsatisfy {|arg| arg.length == 2})


I just encountered that. I wonder how it's not fixed by now


For future reference: all RR methods are aliased as rr_*, so in this case you can use #rr_satisfy.

@mcmire mcmire closed this Mar 15, 2013

I am reopening this.

The reason why this is happening is because in RSpec, in order to set up an example group, two things happen:

  1. a module which represents the mock framework (RR) is mixed into the example group
  2. a module which represents the expectation framework (rspec-expectations) is then mixed into the example group


So, RSpec's #satisfy is indeed overriding RR's #satisfy.

@mcmire mcmire reopened this Mar 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment