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?
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
Do you have RAILS_ROOT/lib/tasks/rspec.rake in place? If not, grab the
latest code and run ‘script/generate rspec’.