//
archives

Archive for

Factory Girl associations with MongoMapper

If you have an association (an Article belonging to a User) and you write something like that in Cucumber: Given the following article exists: | title | user | | My article | email: writer1@example.com | then the Factory Girl steps will handle this association for you, creating both an Article and a User for … Continue reading

Association testing in rspec with MongoMapper

As far as I know, MongoMapper is currently not able to handle association tests for rspec/shoulda, such as most common belongs_to, has_many, has_one. I think they are working on it, but it’s not there yet. I wrote a hack to work with MongoMapper, so far it’s able to handle my simple belongs_to association, and my … Continue reading