NullVoxPopuli
NullVoxPopuli

Reputation: 65143

Ruby on Rails2.3.8: How do I run a test using the dev environment?

My test env is doing something that doesn't happen in dev. So, if I could run the tests in the dev env, then that would meat that there is something wrong with my tests (if they still fail), or the test env is broke (if they don't fail)

currently, I'm running single functional tests by doing

ruby /path/to/test_controller_test.rb

Upvotes: 0

Views: 73

Answers (1)

tadman
tadman

Reputation: 211590

If you're running individual tests, there's nothing to stop you from taking a snapshot of your development database and loading it in to the test database. If you run rake test then that will get cleared out, so keep that in mind.

You may have tests that depend on records that don't exist, usually the result of making unsafe assumptions, or methods that don't work properly when certain things have not been built correctly. It is rare to find that the settings in config/environments have any direct effect on the tests themselves.

Upvotes: 1

Related Questions