Rake spec defaults to devel env

I was experiencing the weirdest behavior (rake spec running fine
without a test database) the other day. Turned out that actually rake
spec was (and has been for heavens know how long for me) running in
development environment. However script/spec runs in test
environment just as I expect it to do.

Is this how it should go? Am I missing something? If there’s
something broken in my rails app where should I start debugging?

On Fri, Sep 26, 2008 at 12:36 PM, Tero T. [email protected] wrote:

I was experiencing the weirdest behavior (rake spec running fine
without a test database) the other day. Turned out that actually rake
spec was (and has been for heavens know how long for me) running in
development environment. However script/spec runs in test
environment just as I expect it to do.

Is this how it should go? Am I missing something? If there’s
something broken in my rails app where should I start debugging?

This is NOT how it should go :slight_smile:

Do you have RAILS_ROOT/lib/tasks/rspec.rake in place? If not, grab the
latest code and run ‘script/generate rspec’.

Let us know if that solves the problem.

Cheers,
David

On Sep 26, 2008, at 1:36 PM, Tero T. wrote:

Tero T. ## 050 3635 235 ## Tero Tilus – Etusivu


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

rake spec looks at the development environment to prepare the db
schema, but still runs the specs in test

2008-09-26 20:19, Jonathan L.:

rake spec looks at the development environment to prepare the db
schema, but still runs the specs in test

Looks like you’re right. I haven’t really had time to test this
though. I’ll tell when I really know whats going on inside our app.