2011-11-18 23:13:04 +00:00
|
|
|
require 'bundler/setup'
|
2011-11-12 22:04:59 +00:00
|
|
|
require 'bundler/gem_tasks'
|
2010-12-13 22:28:59 +00:00
|
|
|
require 'rspec/core/rake_task'
|
|
|
|
require 'cucumber/rake/task'
|
2011-05-25 18:38:07 +00:00
|
|
|
require 'appraisal'
|
2009-01-09 05:43:32 +00:00
|
|
|
|
2010-12-13 22:28:59 +00:00
|
|
|
RSpec::Core::RakeTask.new do |t|
|
|
|
|
t.pattern = "spec/**/*_spec.rb"
|
2010-12-14 23:35:12 +00:00
|
|
|
t.rspec_opts = '--color --format progress'
|
|
|
|
t.verbose = false
|
2010-12-13 22:28:59 +00:00
|
|
|
end
|
|
|
|
|
2010-12-13 20:56:37 +00:00
|
|
|
Cucumber::Rake::Task.new do |t|
|
2011-05-25 18:38:07 +00:00
|
|
|
t.fork = false
|
2010-12-13 20:56:37 +00:00
|
|
|
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
|
2010-06-23 18:29:51 +00:00
|
|
|
end
|
|
|
|
|
2010-12-13 22:28:59 +00:00
|
|
|
desc 'Default: run specs and cucumber features'
|
2011-05-25 18:38:07 +00:00
|
|
|
task :default => [:all]
|
2010-06-23 18:29:51 +00:00
|
|
|
|
2011-05-25 18:38:07 +00:00
|
|
|
desc 'Test the plugin under all supported Rails versions.'
|
2011-05-30 19:11:13 +00:00
|
|
|
task :all => ["appraisal:cleanup", "appraisal:install"] do |t|
|
2011-05-25 18:38:07 +00:00
|
|
|
exec('rake appraisal spec cucumber')
|
|
|
|
end
|