[rspec-users] Rails3 + RSpec2 sample project?

anywho eydaimon at gmail.com
Mon Feb 22 17:11:39 EST 2010


I'm using this setup with rails 3/1.9.1 and this aforementioned gem.
However, when running rake spec, I get this error:

no such file to load -- test/unit/assertionfailederror

seems 1.9.1 no longer has this file. I tested running it with
commenting out this requirement and simply adding the below to the
rake file, and everything runs fine then.

Suggestions welcome on how to best approach this. Short of branching
rspec, I'm not sure what to do here. The file with the offending code
is: rspec/rails/matchers.rb


module Test
  module Unit
    # Thrown by Test::Unit::Assertions when an assertion fails.
    class AssertionFailedError < StandardError
    end
  end
end





On Feb 7, 12:41 pm, David Chelimsky <dchelim... at gmail.com> wrote:
> On Sun, Feb 7, 2010 at 2:41 PM, David Chelimsky <dchelim... at gmail.com> wrote:
> > On Sun, Feb 7, 2010 at 3:48 AM, Jacques Crocker <merbj... at gmail.com> wrote:
> >> If anyone has any sort of Rails3 + Rspec2 project sort of working, we
> >> should get a stripped down sample project on github. Martin did a
> >> great one for datamapper:http://github.com/snusnu/datamapper_on_rails3.
> >> I can help getting it organized / tested, but I havent been able to
> >> get things working quite yet.
>
> >> I know its all sort of still in flux at the moment. But any help would
> >> be appreciated on how to organize rspec with rails3.
>
> > I don't have time to do a proper blog post right now, but I'll try to
> > get something up in a day or two. In the mean time, assuming you have
> > rails 3 pre already installed:
>
> > rails foo
> > cd foo
> > echo "gem 'rspec-rails', '>=2.0.0.a5' :group => :test" >> Gemfile
>
> This should be:
>
>   echo "gem 'rspec-rails', '>=2.0.0.a5', :group => :test" >> Gemfile
>
> (was missing a comma).
>
> > script/rails generate rspec:install
>
> > rspec:install installs, among other things, a generator so you can just say:
>
> >  script/rails generate model thing name:string
>
> > ... and you'll get a model spec instead of a rails unit test.
>
> > The a5 release only supports model and request (integration - a la
> > merb) specs, but controllers, views and helpers will be coming soon.
>
> > Cheers,
> > David
>
> _______________________________________________
> rspec-users mailing list
> rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users


More information about the rspec-users mailing list