Archive

Posts Tagged ‘factory_girl’

Webrat for integration testing

August 17th, 2009 mindtonic No comments

Factory Girl stringify_keys error in Create Test

July 21st, 2009 mindtonic No comments

I was getting the following error while trying to test the create method of a controller using factory_girl and shoulda:

NoMethodError: undefined method `stringify_keys!`

The error was that I am sending an object to the create method, which actually requires a hash of attributes… the solution is to use factory_girl’s attributes_for method.

Hope this helps!

Categories: Development Tags: ,