thoughtbot--factory_bot/spec
Joshua Clayton 36cb43e9b0 Add global callbacks
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
2013-02-08 11:24:35 -05:00
..
acceptance Add global callbacks 2013-02-08 11:24:35 -05:00
factory_girl Convert to expect syntax 2013-01-18 13:58:36 -05:00
support Convert to expect syntax 2013-01-18 13:58:36 -05:00
factory_girl_spec.rb Convert to expect syntax 2013-01-18 13:58:36 -05:00
spec_helper.rb Update mocha version dependency and require mocha/api 2013-01-18 10:19:00 -05:00