rails/rails — Issue #5193: engine skeleton, tests, fixtures
Author: jrochkind
Created: 2012-02-27 16:20:24+00:00
State: open

I created an engine with 'rails plugin new', which also creates a testing dummy app in test/dummy, which is booted and used by the app context when you run `rake test`, because of the way the generated test/test_helper.rb is written.

Great. It works.

Except not for fixtures. Some of my tests try to load fixtures eg, ./test/unit/something_test.rb

SomethingTest < ActiveSupport::TestCase
fixtures :something

When I run `rake test`, it raises complaining that it couldn't find `./test/dummy/test/fixtures/something.yml`. When in fact my fixtures are in `./test/fixtures`, not in the dummy app. Along with the rest of my testing stuff.

The dummy app generated by `rails plugin new` looks for tests in the engine itself, not in the dummy app. But doesn't do the same thing for fixtures?

Anyone have any ideas of anything I can do to fix this, another line in test_helper.rb that would tell it where to look for fixtures , somehow?