Rspec 2.11 fails to add "should" method under MacRuby #159

faun opened this Issue Jul 24, 2012 · 2 comments


None yet
2 participants

faun commented Jul 24, 2012

See this example project:

The project runs correctly when the version of Rspec required in the Gemfile is downgraded to 2.10.


myronmarston commented Jul 25, 2012

Thanks for reporting this. The source of this issue is this commit:


It appears that on MacRuby, BasicObject is defined, but is not the root of the object hierarchy as I expect on 1.9. The weird thing is that if I run your example without bundler, it passes, but with bundler, it fails. Not sure why.

Anyhow, as a temporary work around, you can configure this:

RSpec::Matchers.configuration.add_should_and_should_not_to Object

I've never used MacRuby before. It'd be great to get RSpec fully working against it but I'd also say that to the extent that MacRuby differs from rubyspec RSpec may have problems working on it.

Any ideas about this?

ggilder added a commit to ggilder/rspec-expectations that referenced this issue Jul 25, 2012

myronmarston added a commit that referenced this issue Jul 25, 2012

Merge pull request #160 from ggilder/master
#159: Revise should(_not) to work with MacRuby

myronmarston commented Jul 25, 2012

This has been fixed in master now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment