Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Oct 23, 2014
  1. @joshuaclayton
Commits on May 30, 2014
  1. @joshuaclayton

    Allow selective linting

    joshuaclayton authored
    Closes #653
Commits on May 29, 2014
  1. @joshuaclayton

    Include path to RSpec helper

    joshuaclayton authored
    Closes #648
  2. @joshuaclayton
Commits on Feb 26, 2014
  1. @joshuaclayton

    Include DatabaseCleaner usage when demoing FactoryGirl.lint

    joshuaclayton authored
    Because built factories create associated records, the database may not
    be empty when the suite is run. This encourages developers to start
    DatabaseCleaner and clean after linting is complete to ensure a clean
    database.
    
    Closes #619, #611, #620
Commits on Feb 9, 2014
  1. @joshuaclayton
Commits on Dec 15, 2013
  1. @joshuaclayton
Commits on Mar 25, 2013
  1. @joshuaclayton
Commits on Feb 8, 2013
  1. @joshuaclayton

    Add global callbacks

    joshuaclayton authored
    This allows callbacks (after :build, :create, etc.) to be defined at the
    FactoryGirl level; this means that the callback will be invoked for all
    factories. This is primarily to maintain consistency and follow the
    principle of least surprise.
    
    As usual, callbacks are applied from the lowest component to the
    highest, meaning that global callbacks will be run after factory and
    trait callbacks are run.
    
        FactoryGirl.define do
          after(:build) {|object| puts "Built #{object}" }
    
          factory :user
          # ...
        end
    
    Closes #481
    Closes #486
Commits on Jan 18, 2013
  1. @joshuaclayton

    Convert to expect syntax

    joshuaclayton authored
Commits on Sep 11, 2012
  1. @joshuaclayton

    Support binding a block to multiple callbacks

    joshuaclayton authored
    This allows for binding multiple callbacks (after_stub, before_create,
    etc.) to a single block. This is useful if you want a block to be called
    across all build strategies (since build_stubbed doesn't share any
    callbacks with build/create).
    
    Examples:
    
        factory :user do
          callback(:after_stub, :before_create) { do_something }
          after(:stub, :create) { do_something_else }
          before(:create, :custom) { do_a_third_thing }
        end
Commits on Aug 2, 2012
  1. @joshuaclayton

    Prep for FactoryGirl 4.0

    joshuaclayton authored
  2. @joshuaclayton
Commits on Jul 27, 2012
  1. @joshuaclayton
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 Apr 24, 2012
  1. @joshuaclayton
  2. @joshuaclayton
  3. @joshuaclayton
  4. @joshuaclayton

    Fix dashes

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

    Clean up

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

    Remove Rails 2 support

    joshuaclayton authored
Commits on Feb 17, 2012
  1. @joshuaclayton
  2. @joshuaclayton
  3. @joshuaclayton
Something went wrong with that request. Please try again.