Error: When using a callback like after(:create) or before(:create), Ruby raises this error:
Both value and block given (FactoryGirl::AttributeDefinitionError)
Cause: These callback syntaxes are supported from factory_girl 3.3.0 or above.
Solution:
Change after(:create) to after_create and before(:create) to before_create
Or Upgrade factory_girl to version >=3.3.0