This project is archived and is in readonly mode.

#1878 ✓committed
Balint Erdi

a generated plugin's tests are not run by 'rake test'

Reported by Balint Erdi | February 4th, 2009 @ 11:08 PM | in 2.3.9

The test_helper.rb file generated for a plugin does not run the plugin's tests on 'rake test' (standing in the plugin's directory). That is very easy to verify:

  • ./script/generate plugin my_plugin
  • cd vendor/plugins/my_plugin
  • rake test

No tests will be run. A "truth test" is generated by default so you should see ("1 tests, 1 assertions, 0 failures, 0 errors"). That's because test/unit is not required in the test_helper.rb file and the fix is just that, require it (see attached patch).

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

Referenced by