Musician, Ruby on Rails Entusiast, Composer, Programmer and Lover of Hot Sauce

Webrat for integration testing

Posted: August 17th, 2009 | Author: mindtonic | Filed under: Uncategorized | Tags: , , , | No Comments »

Webrat:

Integration Testing:


Factory Girl stringify_keys error in Create Test

Posted: July 21st, 2009 | Author: mindtonic | Filed under: Development | Tags: , | 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!