Browse files

Install appraisals before running the test suite

Currently, `rake` does run the `appraise` task before running tests. If
you run `rake appraise` on its own, it runs `rake appraise:install`
beforehand. However, the way that `rake` runs `appraise` is by
executing, not invoking, it. Hence, `appraisal:install` will actually
not be run (as #execute does not run dependencies for the task being

This fix is mostly useful when running tests locally -- on Travis this
isn't a problem b/c we are running `rake spec cucumber` instead of just
  • Loading branch information...
mcmire committed Jan 20, 2014
1 parent 561ac3e commit 5c3fb37a142b6591c69cf8d4ef5c000581f319fe
Showing with 8 additions and 5 deletions.
  1. +1 −1
  2. +2 −0
  3. +5 −4 Rakefile
@@ -3,7 +3,7 @@ We love pull requests. Here's a quick guide:
1. Fork the repo.
2. Run the tests. We only take pull requests with passing tests, and it's great
-to know that you have a clean slate: `bundle && rake`
+to know that you have a clean slate: `bundle && bundle exec rake`
3. Add a test for your change. Only refactoring and documentation changes
require no new tests. If you are adding functionality or fixing a bug, we need
@@ -25,6 +25,8 @@
* Change `validate_uniqueness_of(...)` so that it provides default values for
non-nullable attributes.
+* Running `rake` now installs Appraisals before running the test suite.
# v 2.5.0
* Fix Rails/Test::Unit integration to ensure that the test case classes we are
@@ -15,14 +15,15 @@ do |t|
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
-task :default do |t|
+task :default do
if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/
- exec 'rake spec cucumber'
+ Rake::Task['spec'].invoke
+ Rake::Task['cucumber'].invoke
- Rake::Task['appraise'].execute
+ Rake::Task['appraise'].invoke
-task :appraise => ['appraisal:install'] do |t|
+task :appraise => ['appraisal:install'] do
exec 'rake appraisal'

0 comments on commit 5c3fb37

Please sign in to comment.