thoughtbot/factory_girl — pull request #435 by joshuaclayton (2012-09-11 15:10:29+00:00)
Title: 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