[rspec-users] undefined method `inherit' for Merb::Test::ExampleGroup

David Chelimsky dchelimsky at gmail.com
Tue Feb 3 00:05:32 EST 2009

On Mon, Feb 2, 2009 at 10:36 PM, Phlip <phlip2005 at gmail.com> wrote:
> Pat Maddox wrote:
>> I'll blame Merb on the basis that there is no "inherit" in RSpec.  I'm
>> guessing it's some kind of merb extension.
> http://blog.davidchelimsky.net/2007/4/1/rspec-plays-nice-with-others
> I know I know - time flies!
> If it has been superseded, then how do you inject a batch of assertions
> defined in someone else's class into RSpec?

module MyMethods
  # define matchers

Spec::Runner.configure do |c|
  c.include MyMethods

That will include the module in every example group, regardless of the
base class.

> For example, how does RSpec on Rails import its ActiveSupport::TestCase
> assertions?
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list