Houdini/two_factor_authentication — pull request #24 by rossta (2014-04-08 00:04:13+00:00)
Title: Integration specs

I felt it important to get integration testing added since I'm now using this gem in production. This is a rather large patch so it may require some discussion, including whether or not it's worth breaking into smaller pieces.

Summary of changes:

- adds integration specs with [capybara](https://github.com/jnicklas/capybara) against a "dummy" rails app in the `spec/`
- refactors unit specs
- changes to `Devise::TwoFactorAuthenticationController` necessary to get passing specs
- adds a `success` message to `devise.en.yml`
- adds [Travis-CI](https://travis-ci.org) support with `.travis.yml`
- changes to `Gemfile` to allow running specs against multiple versions of Rails
- default rake task that runs all specs

Notes:

- The gem doesn't appear to support Rails 3.1 out of the box, so you may consider changing the required Rails version in the gemspec. Rails 3.1 testing is omitted from .travis.yml. When running specs against Rails 3.1, I got the following error:
```
../two_factor_authentication/lib/two_factor_authentication/orm/active_record.rb:11:in `': uninitialized constant ActiveRecord::ConnectionAdapters::Table (NameError)`.
```
- The tests run only against the latest version of Devise. Future work could include running tests against earlier versions as well
- It'd be cool to add a badge for Travis