This project is archived and is in readonly mode.

#2248 ✓duplicate
Adam Elliot

Plugin Tests not Running

Reported by Adam Elliot | March 16th, 2009 @ 07:21 AM | in 2.x

I'm not sure if this is a bug or I'm not using the feature set as intended, but I'm having issues executing test cases right from my plugin. It appears things aren't running as expected right from the get go (script/generate plugin blah).

Here's what's going on. I've generated a new plugin (rails 2.3rc2, but I've tried this on 2.2.2 and it does the same thing):

script/generate plugin blah

When I switch to the plugins folder and run the default tests:


cd vendor/plugins/blah
rake test

It loads all the tests, but none of them actually run. If I change the default test to:


test "the truth" do
  assert false
end

It doesn't fail.

If I run rake test:plugins from RAILS_ROOT the tests fail, but it also loads portions of the application code, which is undesirable. Should rake test work in the plugin's folder or am I misunderstanding things?

Thanks, Adam

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages