2011-11-18 18:13:04 -05:00
|
|
|
require 'bundler/setup'
|
2011-11-12 17:04:59 -05:00
|
|
|
require 'bundler/gem_tasks'
|
2010-12-13 17:28:59 -05:00
|
|
|
require 'rspec/core/rake_task'
|
|
|
|
require 'cucumber/rake/task'
|
2011-05-25 14:38:07 -04:00
|
|
|
require 'appraisal'
|
2009-01-09 00:43:32 -05:00
|
|
|
|
2010-12-13 17:28:59 -05:00
|
|
|
RSpec::Core::RakeTask.new do |t|
|
|
|
|
t.pattern = "spec/**/*_spec.rb"
|
2010-12-14 18:35:12 -05:00
|
|
|
t.rspec_opts = '--color --format progress'
|
|
|
|
t.verbose = false
|
2010-12-13 17:28:59 -05:00
|
|
|
end
|
|
|
|
|
2010-12-13 15:56:37 -05:00
|
|
|
Cucumber::Rake::Task.new do |t|
|
2011-05-25 14:38:07 -04:00
|
|
|
t.fork = false
|
2010-12-13 15:56:37 -05:00
|
|
|
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
|
2010-06-23 14:29:51 -04:00
|
|
|
end
|
|
|
|
|
2014-01-20 13:35:10 -05:00
|
|
|
task :default do
|
2013-03-04 16:10:54 -05:00
|
|
|
if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/
|
2014-01-20 13:35:10 -05:00
|
|
|
Rake::Task['spec'].invoke
|
|
|
|
Rake::Task['cucumber'].invoke
|
2013-03-04 16:10:54 -05:00
|
|
|
else
|
2014-01-20 13:35:10 -05:00
|
|
|
Rake::Task['appraise'].invoke
|
2013-03-04 16:10:54 -05:00
|
|
|
end
|
2011-05-25 14:38:07 -04:00
|
|
|
end
|
2012-04-10 00:06:09 -04:00
|
|
|
|
2014-01-20 13:39:18 -05:00
|
|
|
task :appraise do
|
|
|
|
exec 'appraisal install && appraisal rake'
|
2013-03-04 16:10:54 -05:00
|
|
|
end
|