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

Pat Maddox pergesu at gmail.com
Mon Feb 2 23:11:11 EST 2009


I'll blame Merb on the basis that there is no "inherit" in RSpec.  I'm
guessing it's some kind of merb extension.

Pat


On Mon, Feb 2, 2009 at 6:19 PM, Phlip <phlip2005 at gmail.com> wrote:
> I have to bump this one because it looks like it's on RSpec's core feature
> list, and I reeally need a fix for it.
>
> Feel free to blame Merb, if they munged the inherit() method somehow!
>
>> Here's the relevant bits that don't work. (I changed the goal library to
>> the 'assert2' patched into Test::Unit::Assertions.)
>>
>> require File.join( File.dirname(__FILE__), '..', "spec_helper" )
>> require 'test/unit'
>> require 'assert2'
>>
>>
>> describe 'Post' do
>>
>>  before do
>>    include Test::Unit::TestCase
>>     # inherit Test::Unit::TestCase # does not compile
>>     # include Test::Unit::Assertions # does not import assert{}
>>  end
>>
>>  it 'should have fixtures' do
>>    posts = posts(:Joan_Crawford_Has_Risen, :Jammin, :Sardonicus, :Lithium)
>>    posts[0].body.should == 'From the Grave'
>>    posts[0].tags.should include(tags(:progressive))
>>
>>  # this line never compiles
>>    assert{ posts[0].tags.include? tags(:rocksteady) }
>>  end
>>
>> end
>>
>> The rspec-rails plugin sure has me spoiled, huh? I formerly thought
>> Test::Unit::Assertions would be automatically available, even without Rails
>> around...
>>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list