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

Phlip phlip2005 at gmail.com
Mon Feb 2 21:19:23 EST 2009



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...
> 




More information about the rspec-users mailing list