This category contains 3 posts

Tutorial: Using Cucumber testing with MongoDB

This example is based on the following tutorial http://www.mongodb.org/display/DOCS/MongoDB+Data+Modeling+and+Rails. I recommend reading it to get familiar with how MongoDB is integrated with a Rails application. I rewrote the project using the TDD approach with Cucumber and the source code can be found on github 1. First of all, create a mock application with suspenders. gem … Continue reading

Cucumber and Factory Girl testing when having Single Table Inheritance

To get familiar with Single Table Inheritance, please, refer to this article Let’s assume, we have a web site requiring authentication and we have a User class that allows every user to log in, created with the gems Clearance and Suspenders such as described here, with a user name field added. Now, let’s have 2 … Continue reading

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

ip tracing