Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Commit

Permalink
Add minitest generator config
Browse files Browse the repository at this point in the history
  • Loading branch information
paulelliott committed Aug 24, 2012
1 parent 15bff30 commit aadf85a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion views/_content.markdown
Expand Up @@ -335,13 +335,20 @@ specifying it in your `config/application.rb`. Use this if you are using rspec:
g.fixture_replacement :fabrication
end

... and this if you are using test/unit:
... or this if you are using test/unit:

config.generators do |g|
g.test_framework :test_unit, fixture_replacement: :fabrication
g.fixture_replacement :fabrication, dir: "test/fabricators"
end

... or this if you are using minitest:

config.generators do |g|
g.test_framework :mini_test, fixture_replacement: :fabrication
g.fixture_replacement :fabrication, dir: "test/fabricators"
end

Once it's setup, a fabricator will be generated whenever you generate a model.

rails generate model widget
Expand Down

0 comments on commit aadf85a

Please sign in to comment.