stffn / declarative_authorization

An unmaintained authorization plugin for Rails. Please fork to support current versions of Rails
MIT License
1.24k stars 230 forks source link

Improved test infrastructure #149

Closed jhawthorn closed 12 years ago

jhawthorn commented 12 years ago

Closely related to #142

I've made an attempt at improving the test setup.

These commits add gemfiles for rails 2.3, 3.0, 3.1, and 3.2. This is somewhat similar to how thoughbot/paperclip is tested. A rails application is initialized in test_helper.rb for rails versions >= 3 which should alleviate the need for a dummy project.

Added a few new rake tasks

rake bundles:install # bundle install all available gemfiles
rake bundles:update  # bundle update all available gemfiles
rake bundles:test    # test against all available gemfiles
                     # (this is now the default for `rake`)

Tests for one version can be run like

BUNDLE_GEMFILE=gemfiles/3.2.gemfile bundle exec rake test

Also added a .travis.yml, result can be seen here http://travis-ci.org/#!/jhawthorn/declarative_authorization/builds/1841883

stffn commented 12 years ago

Wow, great patch to set the testing infrastructure right. One point, though: are you sure that we need to have those *.lock in the repository?

jhawthorn commented 12 years ago

You are right. I've removed *.gemfile.lock.