Permalink
Browse files

run tests without Appraisal when BUNDLE_GEMFILE is set

  • Loading branch information...
1 parent cc80b6e commit 14dfd9e4f95720a5de0e26ca9fb89590515bb7d6 @mjankowski mjankowski committed Apr 3, 2012
Showing with 10 additions and 6 deletions.
  1. +10 −6 Rakefile
View
@@ -1,14 +1,18 @@
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'appraisal'
-require 'rspec/core/rake_task'
+require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
-desc "Default: run the unit tests."
-task :default => [:all]
+task :default do |t|
+ if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/
+ exec 'rake spec'
+ else
+ Rake::Task['appraise'].execute
+ end
+end
-desc 'Test the plugin under all supported Rails versions.'
-task :all => ["appraisal:install"] do |t|
- exec('rake appraisal spec')
+task :appraise => ['appraisal:install'] do |t|
+ exec 'rake appraisal'
end

0 comments on commit 14dfd9e

Please sign in to comment.