1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
thoughtbot--shoulda-matchers/Rakefile

40 lines
1.1 KiB
Text
Raw Normal View History

2011-11-18 18:13:04 -05:00
require 'bundler/setup'
2011-11-12 17:04:59 -05:00
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'appraisal'
require_relative 'tasks/documentation'
require_relative 'spec/support/tests/database'
require_relative 'spec/support/tests/current_bundle'
RSpec::Core::RakeTask.new('spec:unit') do |t|
t.ruby_opts = '-w -r ./spec/report_warnings'
t.pattern = "spec/unit/**/*_spec.rb"
2010-12-14 18:35:12 -05:00
t.rspec_opts = '--color --format progress'
t.verbose = false
end
RSpec::Core::RakeTask.new('spec:acceptance') do |t|
t.ruby_opts = '-w -r ./spec/report_warnings'
t.pattern = "spec/acceptance/**/*_spec.rb"
t.rspec_opts = '--color --format progress'
t.verbose = false
end
task :default do
if Tests::CurrentBundle.instance.appraisal_in_use?
2015-12-13 21:44:29 -05:00
sh 'rake spec:unit --trace'
sh 'rake spec:acceptance --trace'
else
if ENV['CI']
2015-12-13 21:44:29 -05:00
exec "appraisal install && appraisal rake --trace"
else
appraisal = Tests::CurrentBundle.instance.latest_appraisal
2015-12-13 21:44:29 -05:00
exec "appraisal install && appraisal #{appraisal} rake --trace"
end
end
end
2012-04-10 00:06:09 -04:00
Shoulda::Matchers::DocumentationTasks.create
task release: 'docs:publish_latest'