Update Rails configuration instructions on the website
Closed this issue · 3 comments
Using Rails 3.1.3 and test/unit the following syntax from the Fabrication site no longer works:
config.generators do |g|
g.fixture_replacement :fabrication, :dir => "test/fabricators"
end
To get things to work properly I'm having to use the following config:
config.generators do |g|
g.test_framework :test_unit, :fixture_replacement => :fabrication
g.fixture_replacement :fabrication, :dir => "test/fabricators"
end
I'm not 100% sure this is exactly the right way to specify the config but it seems to be the only way to get it working in Rails 3.1.3.
I should also add that I think config.generators is now deprecated in favour of config.app_generators.
The guides still refer to it as config.generators.
http://guides.rubyonrails.org/generators.html
You are absolutely right about the test_framework line missing though. I just updated the docs to include it. Thanks!
No problem. From looking at the Rails source I can confirm that config.generators is deprecated in 3.1.x and will be gone entirely in 3.2 - replaced with config.app_generators. Just a heads up in advance!