Make it work with Rails 3 and 4
Fix deprecation warnings during test runs
Run tests on Rails 3.1, 3.2 and 4.0