Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

run tests without Appraisal when BUNDLE_GEMFILE is set

  • Loading branch information...
commit 14dfd9e4f95720a5de0e26ca9fb89590515bb7d6 1 parent cc80b6e
@mjankowski mjankowski authored
Showing with 10 additions and 6 deletions.
  1. +10 −6 Rakefile
View
16 Rakefile
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.