Permalink
Browse files

Better check for option presence

  • Loading branch information...
1 parent 0d94362 commit 4583093c3727d1fa2cc9a01f83eae405a914f373 @urbanautomaton urbanautomaton committed Jun 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/factory_girl_rails/railtie.rb
@@ -8,7 +8,7 @@ class Railtie < Rails::Railtie
generators = config.respond_to?(:app_generators) ? config.app_generators : config.generators
options = generators.options[:rails]
- if options[:test_framework] == :rspec && !options[:fixture_replacement]
+ if options[:test_framework] == :rspec && !options.has_key?(:fixture_replacement)
generators.fixture_replacement :factory_girl
elsif options[:test_framework] != :rspec
generators.test_framework :test_unit, :fixture => false, :fixture_replacement => :factory_girl

0 comments on commit 4583093

Please sign in to comment.