Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

g.fixture_replacement ignored

#3937

My config/application.rb has:

config.generators do |g|
   g.fixture_replacement :factory_girl
end

and I have factory_girl generators downloaded from: http://github.com/indirect/rails3-generators

If I run

rails generate scaffold Article title:string body:text

it creates a yml fixture. If I run it with

--fixture-replacement=factory_girl

then it works. Sounds to me like it's ignoring g.fixture_replacement. Tried to dig into the code, unfortunately didn't have time to figure out the method_missing call in Rails::Configuration::Generators. Any thoughts?

Reported by Joe F. · February 12th, 2010 @ 12:09 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. jduff
    jduff

    The syntax changed slightly it seems, this works:

    config.generators do |g|
      g.test_framework :test_unit, :fixture_replacement=>:factory_girl
    end
    

    September 12th, 2010 @ 09:06 PM

  2. Rohit Arondekar
    Rohit Arondekar
    • Importance changed from to Low

    Joe, does the above code work for you?

    September 13th, 2010 @ 01:58 AM

  3. David Trasbo
    David Trasbo
    • State changed from new to invalid

    Using the option syntax works on master.

    September 20th, 2010 @ 07:48 PM