This project is archived and is in readonly mode.
a generated plugin's tests are not run by 'rake test'
-
hiroshi
I'v just stumbled upon the same problem with Rails 2.3.0 (RC1). I think this problem may discourages many authors of plugins from writing tests of their own plugins (, so possibly do I).
I wish this patch is merged before official release of 2.3.X and next version of 2.2.X.
-
Matt Jones
- Tag changed from 2.2.2, generators, patch, plugins to 2.3, generators, patch, plugins
I'll confirm that this is a problem, but the patch should swap the order that rubygems and test/unit are required, as miniunit gets pulled in from gems with "require 'test/unit'".
-
Balint Erdi
Right, I have not thought about that, thank you. Here goes the updated patch.
-
Jeremy Olliver
I think that the tests do run when just 'rake' is called, though you're quite right, that 'rake test' should run them as well. Tests all pass. I'm happy with this patch being added as is.
-
hiroshi
Every time I generate a plugin I waste a time googling words like "rails plugin test not run". I think this issue should be attended asap.
While this issue has been left months, a duplicated ticket #2248 Plugin Tests not Running is created. It also should be closed as "duplicated".
I hope this comment bump up the priority :)
-
hiroshi
I'v found when this issue happened from log of templates/test_helper.rb. It happened since release 2.2.1.
The commit:
http://github.com/rails/rails/commit/7418d367f0ac4a4ac0ab4604c1b10d...
The ticket having a patch which side effected this issue:
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets... -
dwaite
This patch fixes the issue for me, my tests now run. I'm somewhat surprised this issue has sat open for as long as it has.
-
dwaite
- Tag changed from 2.3, generators, patch, plugins to 2.3, generators, patch, plugins, verified
-
michaelmell
+1
-
cnk
Please incorporate this small change into the stock plugin generator. It is a small fix for a puzzling bug.
-
CancelProfileIsBroken
- Tag changed from 2.3, generators, patch, plugins, verified to 2.3, generators, patch, plugins, verifiedbugmash
-
CancelProfileIsBroken
- Tag changed from 2.3, generators, patch, plugins, verifiedbugmash to 2.3, bugmash, generators, patch, plugins, verified
-
Rajesh
+1
-
Nikolay Petrachkov
- Assigned user set to Pratik
"verified" patch by Balint Erdi "I've attached a patch." for master.
-
Rizwan Reza
verified
+1 The last patch works in master.
-
Repository
- State changed from new to resolved
(from [a1c289dbe44f32d30d3addcb6b9c912d153f93b0]) Require test/unit in the generated test_helper for plugin [#1878 a generated plugin's tests are not run by 'rake test' state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/a1c289dbe44f32d30d3addcb6b9c91... -
CancelProfileIsBroken
- Assigned user cleared.
- Tag changed from 2.3, bugmash, generators, patch, plugins, verified to 2.3, generators, patch, plugins, verified
- Milestone cleared.
-
Mike Breen
This is still broken in 2-3-stable.
-
Mike Breen
Here's a patch for 2-3-stable.
-
Michel Pigassou
- Importance changed from to
Was the patch include in versions up to 2.3.8?
It's the version of Rails I use and I have the same problem, however it's been marked as resolved in August 2009. -
Santiago Pastorino
- Assigned user set to José Valim
- State changed from resolved to open
- Milestone set to 2.3.9
