In previous version of Rails, it was suggested that individual tests could be run like this:
ruby -Itest test unit/test/category_test.rb
Since Rails 3, I’ve been unsuccessful at actually being able to run tests that way. Specifically, the environment dumps out a few errors messages and fails to execute the tests.
Instead, I’ve begun to use Rake to execute an individual test:
rake test TEST=test/unit/category_test.rb
Ultimately this works the same way as the old ‘ruby -I test’ commands from previous versions of Rails.
Leave a Reply
You must be logged in to post a comment.