From fc6d1b30b12bc61f5e1bbe28a7bdaf78f1649b24 Mon Sep 17 00:00:00 2001 From: Joe Ferris Date: Wed, 19 Jan 2011 19:26:27 -0500 Subject: [PATCH] Deprecated the default strategy option --- lib/factory_girl/factory.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/factory_girl/factory.rb b/lib/factory_girl/factory.rb index dc9f313..27d34c2 100644 --- a/lib/factory_girl/factory.rb +++ b/lib/factory_girl/factory.rb @@ -182,7 +182,11 @@ module FactoryGirl unless invalid_keys == [] raise ArgumentError, "Unknown arguments: #{invalid_keys.inspect}" end - assert_valid_strategy(options[:default_strategy]) if options[:default_strategy] + if options[:default_strategy] + assert_valid_strategy(options[:default_strategy]) + puts "WARNING: default_strategy is deprecated." + puts "Override to_create if you need to prevent a call to #save!." + end end def assert_valid_strategy(strategy)