Sha256: c61b60ee55f24332b7f48e22dd0f17f083c3d86152542c7803142e94f16a998b

Contents?: true

Size: 612 Bytes

Versions: 8

Compression:

Stored size: 612 Bytes

Contents

require 'active_support'
require 'factory_girl/factory'
require 'factory_girl/attribute_proxy'
require 'factory_girl/attribute'
require 'factory_girl/sequence'
require 'factory_girl/aliases'

# Shortcut for Factory.create.
#
# Example:
#   Factory(:user, :name => 'Joe')
def Factory (name, attrs = {})
  Factory.create(name, attrs)
end

if defined? Rails
  Rails.configuration.after_initialize do
    Factory.definition_file_paths = [
      File.join(RAILS_ROOT, 'test', 'factories'),
      File.join(RAILS_ROOT, 'spec', 'factories')
    ]
    Factory.find_definitions
  end
else
  Factory.find_definitions
end

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
dima-exe-factory_girl-1.1.5.0 lib/factory_girl.rb
dima-exe-factory_girl-1.1.5.1 lib/factory_girl.rb
gsterndale-warrant-0.2.0 test/rails_root/vendor/gems/thoughtbot-factory_girl-1.1.5/lib/factory_girl.rb
gsterndale-warrant-0.3.0 test/rails_root/vendor/gems/thoughtbot-factory_girl-1.1.5/lib/factory_girl.rb
thoughtbot-factory_girl-1.1.4 lib/factory_girl.rb
thoughtbot-factory_girl-1.1.5 lib/factory_girl.rb
factory_girl-1.1.4 lib/factory_girl.rb
factory_girl-1.1.5 lib/factory_girl.rb