[rspec-devel] [ rspec-Bugs-8786 ] 0.8.0-RC1 rake tasks seems to behave unobvious if test database does not exist

noreply at rubyforge.org noreply at rubyforge.org
Tue Feb 27 13:41:30 EST 2007


Bugs item #8786, was opened at 2007-02-21 13:38
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=8786&group_id=797

Category: rails plugin
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 3
Submitted By: Yurii Rashkovskii (yrashk)
Assigned to: Nobody (None)
Summary: 0.8.0-RC1 rake tasks seems to behave unobvious if test database does not exist

Initial Comment:
If there is no test database, rake spec just tells nothing about this:

$ rake spec
/opt/local/bin/rake:17:Warning: require_gem is obsolete.  Use gem instead.
(in /Users/yrashk/somewhere/)
rake aborted!
RSpec failures

(See full trace by running task with --trace)

It seems to be not a major bug, but a kind of an unobvious behavior.

----------------------------------------------------------------------

>Comment By: David Chelimsky (dchelimsky)
Date: 2007-02-27 18:41

Message:
I believe that Scott is correct, so closing this. Following verifies:

$ rails experiment
      create
      ...
$ cd experiment/
$ script/generate model Toy
      exists  app/models/
      exists  test/unit/
      exists  test/fixtures/
      create  app/models/toy.rb
      create  test/unit/toy_test.rb
      create  test/fixtures/toys.yml
      create  db/migrate
      create  db/migrate/001_create_toys.rb
9$ rake    
(in /Users/david/projects/ruby/experiment)
/usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb"  
/usr/local/bin/ruby -Ilib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader.rb"  
rake aborted!
Test failures

(See full trace by running task with --trace)


----------------------------------------------------------------------

Comment By: Scott Taylor (smtlaissezfaire)
Date: 2007-02-27 17:33

Message:
I believe the same thing happens with Test::Unit.  

This would require modifying the rake task db:test:prepare, which comes standard with rails.  I'm sure that if a modified version was written, it should be submitted to rails core and not rspec.

----------------------------------------------------------------------

Comment By: James Hughes (jpath)
Date: 2007-02-23 14:15

Message:
I can confirm this. I have the require lines for ActiveRecord commented out in my local rspec_on_rails in rails.rb. The rake task just dies when it gets to running the model tests.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=8786&group_id=797


More information about the rspec-devel mailing list