[Rspec-devel] run specs FAST with rails_spec

Jay Levitt lists-rspec at shopwatch.org
Tue Jul 4 09:25:05 EDT 2006

aslak hellesoy wrote:
> In subversion I just added an additional feature to the rails stuff.
> After doing a 'ruby script/generate rspec' you will have two new
> files:

This is REALLY exciting!  This was my #1 hope for rspec.  (#2 is 
integration testing, now that you're all freed up...)

> The latest gem doesn't have this code yet, so for now you will have to
> do a rake package from svn and install the rspec and rspec_generators
> from your file system.

To spell that out, this seems to be:

svn export svn://rubyforge.org//var/svn/rspec/trunk
cd rspec/trunk
rake package
rake package_rails

The rspec_generator is cleverly hidden in 

I installed both of these, and then installed the two gems.  I went back 
to my app and redid

script/generate rspec

I then ran the script/rails_spec_runner, and when it said "Ready", I ran 
"script/rails_spec spec" in another window.  The rails_spec_runner 

/cygdrive/c/dev/src/eclipse/inventory/config/environment.rb:8: warning: 
already initialized constant RAILS_GEM_VERSION

Probably nothing.  The tests completed in no time!  But then I ran them 
again, and they all failed, with errors like:

FixtureClassNotFound in 'The BBB receipt can handle adding the bunny 
The class "Receipt" was not found.
./spec/models/receipt_spec.rb:68:in `setup'
script/rails_spec_runner:25:in `run'
/usr/lib/ruby/1.8/drb/drb.rb:1552:in `perform_without_block'
/usr/lib/ruby/1.8/drb/drb.rb:1512:in `perform'
/usr/lib/ruby/1.8/drb/drb.rb:1586:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1582:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1578:in `main_loop'
/usr/lib/ruby/1.8/drb/drb.rb:1427:in `run'
/usr/lib/ruby/1.8/drb/drb.rb:1424:in `run'
/usr/lib/ruby/1.8/drb/drb.rb:1344:in `initialize'
/usr/lib/ruby/1.8/drb/drb.rb:1624:in `start_service'

Finished in 0.341 seconds

32 specifications, 32 failures

Did I miss a step, or is this a bug with rails_spec_runner's handling of 

> Enjoy!
> Aslak
> _______________________________________________
> Rspec-devel mailing list
> Rspec-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-devel

More information about the Rspec-devel mailing list