Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 13, 2012
  1. Joshua Clayton

    Bump version to 3.3.0

    joshuaclayton authored
Commits on May 12, 2012
  1. Joshua Clayton

    Styles

    joshuaclayton authored
  2. Joshua Clayton

    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
  3. Joshua Clayton

    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
  4. Joshua Clayton
Commits on May 11, 2012
  1. Joshua Clayton
  2. Joshua Clayton
  3. Joshua Clayton
  4. Joshua Clayton

    Fix deprecation messages

    joshuaclayton authored
    Closes #375
Commits on May 6, 2012
  1. Joshua Clayton
  2. Joshua Clayton
  3. Joshua Clayton
Commits on May 5, 2012
  1. Joshua Clayton

    More style tweaks

    joshuaclayton authored
  2. Joshua Clayton

    Cleanup

    joshuaclayton authored
  3. Joshua Clayton

    Clean up documentation

    joshuaclayton authored
  4. Joshua Clayton

    Style cleanup

    joshuaclayton authored
  5. Joshua Clayton
  6. Joshua Clayton

    Style cleanup

    joshuaclayton authored
  7. Joshua Clayton
  8. Joshua Clayton
  9. Joshua Clayton
Commits on May 4, 2012
  1. Joshua Clayton
  2. Joshua Clayton

    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.
  3. Joshua Clayton

    Support *_list for all (including custom) strategies

    Josh Clayton and Joel Oliveira authored joshuaclayton committed
  4. Joshua Clayton

    Move strategy calculation to Factory#run

    Josh Clayton and Jason Draper authored joshuaclayton committed
  5. Joshua Clayton
Commits on May 3, 2012
  1. Joshua Clayton

    Fix Appraisal dependencies and get suite green

    joshuaclayton authored
    The twiddle-wakka specifying only major and minor (not tiny) versions
    will grab latest minor, which ended up being 3.2 for all versions of
    Rails supported. This ensures that when we report supporting Rails 3.0,
    3.1, and 3.2, we actually test against those versions.
    
    It also backports ActiveSupport::Notifications.subscribed, which was
    added in 3.2.
    
    Closes #367
Commits on Apr 26, 2012
  1. Joshua Clayton
Commits on Apr 25, 2012
  1. Joshua Clayton
Commits on Apr 24, 2012
  1. Joshua Clayton
  2. Joshua Clayton
  3. Joshua Clayton
  4. Joshua Clayton
  5. Joshua Clayton
  6. Joshua Clayton

    Whitespace

    joshuaclayton authored
Something went wrong with that request. Please try again.