2011-11-18 18:13:05 -05:00
|
|
|
require 'bundler/setup'
|
2010-06-09 11:42:48 -04:00
|
|
|
require 'cucumber/rake/task'
|
2018-07-16 18:31:25 -04:00
|
|
|
require 'rspec/core/rake_task'
|
2010-06-09 11:42:48 -04:00
|
|
|
|
2016-12-02 10:25:09 -05:00
|
|
|
Bundler::GemHelper.install_tasks name: 'factory_bot_rails'
|
|
|
|
|
2010-06-09 11:42:48 -04:00
|
|
|
Cucumber::Rake::Task.new(:cucumber) do |t|
|
|
|
|
t.fork = true
|
|
|
|
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
|
|
|
|
end
|
|
|
|
|
2018-07-16 18:31:25 -04:00
|
|
|
RSpec::Core::RakeTask.new(:spec)
|
|
|
|
|
2012-11-02 16:04:19 -04:00
|
|
|
require 'appraisal'
|
|
|
|
|
|
|
|
desc 'Run the test suite'
|
|
|
|
task :default do |t|
|
|
|
|
if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/
|
2018-07-16 18:31:25 -04:00
|
|
|
exec 'rake spec && rake cucumber'
|
2012-11-02 16:04:19 -04:00
|
|
|
else
|
|
|
|
Rake::Task['appraise'].execute
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
task :appraise => ['appraisal:install'] do |t|
|
|
|
|
exec 'rake appraisal'
|
|
|
|
end
|