This project is archived and is in readonly mode.

#1137 ✓committed
Mathias Meyer

[PATCH] Plugin generator creates non-working Test class

Reported by Mathias Meyer | September 29th, 2008 @ 08:29 PM | in 2.x

The current plugin generator generates a test case that makes use of ActiveSupport's test method. But the generated test class is a subclass of Test::Unit::TestCase which doesn't have access to said method. So the tests fail out of the box.

My suggestion would be to change the generated code back to the old-style test method naming to generated a method like test_the_truth instead of test "the truth". The latter will only result in Kernel#test being called, which gives rather weird error messages.

The alternative would be to gem and require all the required ActiveSupport files, or to put the test method into a module and include it in Test::Unit::TestCase.

I wanted to put this up for discussion before doing anything about it.

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>

People watching this ticket


Referenced by