bjr5ua
Last Updated: February 25, 2016
·
568
· jan0sch
2aaae7041aca85da930bcaf14d6768d2

Configure test frameworks and fixture replacements in rails

If you want to use another test framework for rails like rspec and factories instead of fixtures. You should adapt config/application.rb as follows:

config.generators do |g|
  g.test_framework :rspec               # Use RSpec as testing framework.
  g.fallbacks[:rspec] = :test_unit      # Fallback to Test-Unit if RSpec is not available.
  g.fixture_replacement :factory_girl   # Use FactoryGirl instead of fixtures.
end
Say Thanks
Respond