Engines issue: rake test_plugins failing when it shouldn't

I create a simple engine with a simple controller:

class FredController < ApplicationController
def hello
render :text => ‘Hello, world!’

and I create a simple functional test within the engine:

class FredControllerTest < Test::Unit::TestCase

def test_hello
get :hello
assert_response :success

Running ‘rake test_plugins’ succeeds, and firing up the server and
requesting /fred/hello gives the expected page.

Now, in the project that includes the engine, I override FredController:

class FredController < ApplicationController
def goodbye
render :text => ‘Goodbye.’

Requesting /fred/hello still gives the correct page (as it should),
but now ‘rake test_plugins’ fails with:

  1. Error:
    ActionController::UnknownAction: No action responded to hello

    fred_controller_test.rb:16:in `test_hello’

In other words, as soon as I define a controller in the app that is
the same as a controller in the plugin, the engine tests use only the
code from the app and not the code from the plugin. I would have
thought they’d use both (as the running app does), or, at worst, use
only the controller code from the plugin.

Can anyone confirm this issue? Is there some way that I can work
around it?


Pete Y.

This is a known issue, directly a result of an update that I made a
few days ago to the engines plugin. Replace your copy of
/vendor/plugins/engines with what you can find at:


I should have a fixed version later today…

  • james


Thanks for your answer, but I think the problem is more than a few
days old. It’s been happening to my code for a couple of weeks at
least. Replacing the engines plugin with the tagged version suggested
makes no difference.


Pete Y.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs