RailsCasts Pro episodes are now free!

Learn more or hide this

Adam Rixey's Profile

GitHub User: adamrixey

Site: http://adamrixey.com

Comments by Adam Rixey


It looks like in current rails (3.2.12 and sometime since this episode), application.rb now combines the require frameworks into rails/all. This make commenting out require 'rails/test_unit/railtie' problematic. So it runs the tests in default directories (the first test run: partial based on rails defaults).

Per this episode we are loading all the *_test.rb files which allows for the custom directories (the second test run: full).

There is probably a way to do the equivalent of commenting out the rails/test_unit/railtie require without having to be responsible to maintain the other requires that rails/all buys us... however you can get around this for now by adding in minitest.rake:

Rake::Task[ :test ].clear  #added
Rake::TestTask.new( :test => 'db:test:prepare' ) do |t|