Permalink
Commits on Jan 18, 2013
  1. Bump version to 4.2.0

    joshuaclayton committed Jan 18, 2013
  2. Fix warnings

    [Closes #463]
    joshuaclayton committed Jan 18, 2013
  3. Evaluate sequences within the context of the Evaluator when possible

    This fixes weird issues where methods invoked within sequences
    (like `sprintf`) fail because these methods are being evaluated within
    the context of the DefinitionProxy. With this change, invoking `#next`
    on a sequence happens from the evaluator so if the scope is provided (it
    usually will be), it'll run in the proper context. This means a couple
    of oddities are fixed:
    
    1. Developers can now refer to methods on the object instance, just like
    in dynamic attributes:
    
        class User
          def company
            # company lookup
          end
        end
    
        FactoryGirl.define do
          factory :user do
            sequence(:job_title) {|n| "{title} #{n} at #{company.name}" }
          end
        end
    
    2. Invoke methods typically available because the method is available on
    Object (e.g. Kernel methods):
    
        FactoryGirl.define do
          factory :user do
            sequence(:last_4_ssn) {|n| sprintf '%04d', n }
          end
        end
    
    [#466]
    Derek Prior and Josh Clayton committed with joshuaclayton Jan 11, 2013
Commits on Jan 4, 2013
  1. Update rails gem versions in Appraisals to use latest stable releases…

    …: 3.2.10, 3.1.9, 3.0.18
    mjankowski committed Jan 4, 2013
Commits on Dec 21, 2012
Commits on Nov 7, 2012
Commits on Nov 2, 2012
Commits on Oct 29, 2012
Commits on Oct 22, 2012
  1. Refactor spec to avoid a general fixture

    * Removes let blocks
    * Introduces factory methods for common test setup
    jferris committed with joshuaclayton Sep 14, 2012
  2. Two typos fix in GETTING_STARTED

    pjg committed with joshuaclayton Oct 15, 2012
Commits on Sep 28, 2012
Commits on Sep 14, 2012
  1. Update copyright years in README.md and LICENSE

    Adarsh Pandit committed Sep 14, 2012
Commits on Sep 11, 2012
  1. Bump version to 4.1.0

    joshuaclayton committed Sep 11, 2012
  2. Support binding a block to multiple callbacks

    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
    joshuaclayton committed Sep 11, 2012
Commits on Aug 11, 2012
Commits on Aug 3, 2012
  1. Bump version to 4.0.0

    joshuaclayton committed Aug 3, 2012
Commits on Aug 2, 2012
  1. Bump version to 3.6.1

    joshuaclayton committed Aug 2, 2012