Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Aug 2, 2012
  1. @joshuaclayton

    Prep for FactoryGirl 4.0

    joshuaclayton authored
  2. @joshuaclayton
Commits on Jul 27, 2012
  1. @joshuaclayton
  2. @ifesdjeen @joshuaclayton

    Adding JRuby support to FactoryGirl

    ifesdjeen authored joshuaclayton committed
      JRuby are affected by inconsistent behavior of overriding
      #respond_to? that is causing an unconditional call to
      #respond_to_missing.
    
      Current change does not affect MRI users in any way,
      JRuby-specific things are wrapped into the RUBY_PLATFORM
      check.
    
      Adding docs, modifying gemspec and travis.yml to make factory_girl to pass on Travis.
    
      Wire up tests
Commits on Jul 14, 2012
  1. @sikachu @joshuaclayton

    Fix FactoryGirl naming convention

    sikachu authored joshuaclayton committed
    So now, we'll always refer to this Gem as FactoryGirl, regardless of
    context. This commit is to make it consistence throughout the code base.
Commits on Jul 7, 2012
  1. @joshuaclayton
Commits on Jun 25, 2012
  1. @joshuaclayton
Commits on Jun 19, 2012
  1. @joshuaclayton
Commits on Jun 8, 2012
  1. @joshuaclayton
Commits on May 18, 2012
  1. @joshuaclayton

    Optionally disable duplicate assignment of attributes in initialize_with

    joshuaclayton authored
    By setting:
    
        FactoryGirl.duplicate_attribute_assignment_from_initialize_with =
    false
    
    This turns off duplicate assignment of attributes accessed from
    initialize_with. This means any attributes accessed from the factory and
    assigned in the initialize_with block won't be subsequently set after
    the object has been instantiated.
    
    This will be the default functionality in 4.0.
    
    Closes #345
Commits on May 12, 2012
  1. @joshuaclayton

    Allow initialize_with defined for all factories

    joshuaclayton authored
    This allows users to define initialize_with for every factory run through
    factory_girl.
    
        FactoryGirl.define do
          initialize_with { new("John Doe") }
        end
    
    If you want to override this default, set it per factory or in a trait
    (and include the trait).
    
    Closes #342
  2. @joshuaclayton

    Allow to_create defined for all factories

    joshuaclayton authored
    This allows users to define to_create for every factory run through
    factory_girl.
    
        FactoryGirl.define do
          to_create {|instance| instance.persist! }
        end
    
    If you want to override this default, set it per factory or in a trait
    (and include the trait).
    
    Closes #341
Commits on May 4, 2012
  1. @joshuaclayton

    Introduce new callback syntax

    Josh Clayton and Jason Draper authored joshuaclayton committed
    Instead of calling before_create, after_build, after_create, or
    after_stub, you can now call:
    
        before(:create) {|instance| instance.name = "overridden!" }
        after(:create)  {|instance| instance.name = "overridden!" }
        after(:build)   {|instance| instance.name = "overridden!" }
        after(:stub)    {|instance| instance.name = "overridden!" }
    
    Additionally, you can declare callbacks longhand:
    
        callback(:after_stub) {|instance| instance.name = "overridden!" }
    
    This allows for custom callbacks to be defined:
    
        callback(:custom_callback) {|instance| instance.name = "overridden!" }
    
    Which can then be used from a custom strategy:
    
        class CustomStrategy
          def association(runner); end
    
          def result(evaluation)
            evaluation.object.tap do |instance|
              evaluation.notify(:custom_callback, instance)
            end
          end
        end
    
        FactoryGirl.register_strategy(:custom, CustomStrategy)
    
    This would allow for calling:
    
        FactoryGirl.custom(:user)
    
    Which would return the user instance but execute the :custom_callback callback
    on the user instance first.
Commits on Apr 24, 2012
  1. @joshuaclayton
  2. @joshuaclayton
  3. @joshuaclayton
  4. @joshuaclayton

    Fix dashes

    joshuaclayton authored
  5. @joshuaclayton
  6. @joshuaclayton
  7. @joshuaclayton
Commits on Apr 20, 2012
  1. @joshuaclayton

    Add documentation to using syntax methods inside dynamic attributes

    Ben Zhang and Josh Clayton authored joshuaclayton committed
    Closes #355
Commits on Apr 19, 2012
  1. @mark-rushakoff
Commits on Apr 6, 2012
  1. @joshuaclayton

    Clean up

    joshuaclayton authored
  2. @kristianmandrup @joshuaclayton
Commits on Mar 31, 2012
  1. @joshuaclayton
  2. @joshuaclayton
Commits on Mar 27, 2012
  1. @subelsky
Commits on Mar 16, 2012
  1. @joshuaclayton

    Remove Rails 2 support

    joshuaclayton authored
Commits on Feb 17, 2012
  1. @joshuaclayton
  2. @joshuaclayton
  3. @joshuaclayton
Commits on Feb 10, 2012
  1. @joshuaclayton

    Proxy => Strategy

    joshuaclayton authored
Commits on Feb 8, 2012
  1. @weppos @joshuaclayton
Commits on Jan 29, 2012
  1. @carlosantoniodasilva
Commits on Jan 23, 2012
  1. @jferris
Something went wrong with that request. Please try again.