Permalink
Browse files

Moved Rails 3 initialization into a separate gem (factory_girl_rails)

  • Loading branch information...
jferris committed Jun 9, 2010
1 parent 434f67b commit fc8ce3ab7ea762f14259174eb2a3f7690741e89c
Showing with 3 additions and 26 deletions.
  1. +1 −2 lib/factory_girl.rb
  2. 0 lib/factory_girl/rails.rb
  3. +0 −22 lib/factory_girl/railtie.rb
  4. +2 −2 rails/init.rb
View
@@ -11,7 +11,6 @@
require 'factory_girl/attribute/callback'
require 'factory_girl/sequence'
require 'factory_girl/aliases'
-require 'factory_girl/railtie'
# Shortcut for Factory.default_strategy.
#
@@ -22,5 +21,5 @@ def Factory (name, attrs = {})
end
class Factory
- VERSION = "1.2.5"
+ VERSION = "1.3.0"
end
No changes.
@@ -1,22 +0,0 @@
-require 'factory_girl'
-
-class Factory
- if defined? Rails::Railtie
- require 'rails'
- class Railtie < Rails::Railtie
- config.after_initialize do
- Factory::Railtie.configure
- end
- end
- end
-
- class Railtie
- def self.configure
- Factory.definition_file_paths = [
- File.join(Rails.root, 'test', 'factories'),
- File.join(Rails.root, 'spec', 'factories')
- ]
- Factory.find_definitions
- end
- end
-end
View
@@ -1,2 +1,2 @@
-require 'factory_girl/railtie'
-Factory::Railtie.configure
+require 'factory_girl'
+Rails.configuration.after_initialize { Factory.find_definitions }

0 comments on commit fc8ce3a

Please sign in to comment.