rails: can't use fixtures with a created engine
hi all, i have trouble testing an engine
rails plugin new something --full
i create an engine, and some models, then i started to test, on ‘rake test’ command i realized that the fixtures are not loaded, so as the helper methods to load fixtures like:
people(:one)
it is a bug or maybe i understand this wrong and I’m using it the wrong way?
About this issue
- Original URL
- State: closed
- Created 12 years ago
- Comments: 29 (11 by maintainers)
Commits related to this issue
- Fix loading fixtures in engine tests fixture_path is a class attribute of ActiveSupport::TestCase, so ActiveSupport::TestCase.method_defined?(:fixture_path=) would always return false. This should f... — committed to grk/rails by grk 10 years ago
- Merge pull request #18719 from 5t111111/add-fix-for-loading-fixtures-in-engine-tests Add fix for loading fixtures in engine tests (additional fix for #4971) Conflicts: railties/lib/rails/generators... — committed to rails/rails by senny 9 years ago
- Merge pull request #18719 from 5t111111/add-fix-for-loading-fixtures-in-engine-tests Add fix for loading fixtures in engine tests (additional fix for #4971) Conflicts: railties/lib/rails/generators... — committed to rails/rails by senny 9 years ago
- fixtures are not loaded. see: * https://github.com/rails/rails/issues/4971#issuecomment-53249151 * http://stackoverflow.com/questions/7519687/schema-and-fixtures-not-being-loaded-when-running-raketes... — committed to fuminori-ido/edgarj by deleted user 8 years ago
This issue continues to exist in
4.2.6
, even tried downgrading to4.2.4
.I have the same problem in 4.0.0 only with models, and fixed it editing
test_helper.rb
as:It seems that
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
returnsfalse
always