I want to use FactoryGirl.attributes_for in controller testing, as in:
it \"raise error creating a new PremiseGroup for this user\" do
expect {
post :c
Here is another way:
FactoryGirl.build(:car).attributes.except('id', 'created_at', 'updated_at').symbolize_keys
Limitations:
create
, as in association :user, strategy: :create
. This strategy can make your factory very slow if you don't use it wisely.