This week I released the RailsApps Testing gem. It sets up a testing framework for Rails by setting up configuration files for:

RSpec

Capybara

Database Cleaner

FactoryGirl

Launchy

Selenium Webdriver

For more about this testing framework, I wrote a tutorial on testing with RSpec (subscriptions support the RailsApps project):

This is a popular collection of gems for testing Rails applications. Typically, a developer makes several small configuration changes when setting up a test framework with these gems. The configuration changes are easy to make manually, but this gem provides a generator to make the changes, for ease of use with an automated process such as an application template.

That’s why I built it. The code for the Rails Composer tool is getting increasingly complex (some would say “gnarly”). I’m slowly moving code from the rails_apps_composer gem (which builds the Rails Composer application template) to separate gems. The first step in that direction was the RailsLayout gem, which generates Rails application layout files for various front-end frameworks such as Bootstrap and Foundation.

I primarily use RSpec and Capybara for testing, but in principle, the gem could also set up Test::Unit or Cucumber frameworks. If someone submits a pull request, it could give users of Rails Composer the option of alternatives to RSpec.

I’m interested in learning more about the configurations people like for their testing frameworks. There are other interesting gems that assist in testing. Some, like Guard, don’t need any special configuration. Others can’t be used without some integration with RSpec. The RailsApps Testing gem sets up one of the common configurations of a test framework. If there are other possibilities, let me know and we can expand the RailsApps Testing gem.

As always, a big thank you to the RailsApps subscribers who support this work.