Use a reader
Subscribe by Email
Blog » Ruby on Rails: When many tests are failing
Posted on 11 Feb 2011 15:08
You need to correct an application but so many unit tests are failing. You're lost in the verbosity of the output. You can filter out the test results.
rake test | grep test.rb | cut -d: -f1 | sed 's/\[//g'
You'll see a neat list of failing test files. Now you can concentrate on the problems one by one doing
rake test:units TEST=test/unit/one_of_them_tests rake test:functionals TEST=test/functional/one_of_them_tests
You can actually open all the failing test files in your editor e.g. kate
rake test | grep test.rb | cut -d: -f1 | sed 's/\[//g' | sed 's/\/test/.\/test/g' | xargs kate
If you like this page, please spread the word:
You can contact me if you have questions or corrections.