Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved test infrastructure #149

Merged
merged 5 commits into from Aug 5, 2012
Merged

Improved test infrastructure #149

merged 5 commits into from Aug 5, 2012

Conversation

jhawthorn
Copy link
Contributor

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

* initialize an app inside test_helper for rails 3
* gemfiles/ contains gemfiles for 2.3, 3.0, 3.1, and 3.2
* rake bundles:test runes tests against all gemfiles
* rake bundles:install and bundles:update installs/updates
@stffn
Copy link
Owner

stffn commented Jul 18, 2012

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
Copy link
Contributor Author

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

stffn added a commit that referenced this pull request Aug 5, 2012
Improved test infrastructure
@stffn stffn merged commit 0d0015b into stffn:master Aug 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants