forked from seuros/state_machine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
41 lines (32 loc) · 1.05 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require 'rubygems'
require 'bundler'
Bundler.setup
require 'rake'
require 'rake/testtask'
require 'appraisal'
desc 'Default: run all tests.'
task :default => :test
desc "Test state_machine."
Rake::TestTask.new(:test) do |t|
integration = %w(active_model active_record data_mapper mongoid mongo_mapper sequel).detect do |name|
Bundler.default_gemfile.to_s.include?(name)
end
t.libs << 'lib'
t.test_files = integration ? Dir["test/unit/integrations/#{integration}_test.rb"] : Dir['test/{functional,unit}/*_test.rb'] + ['test/unit/integrations/base_test.rb']
t.verbose = true
t.warning = true if ENV['WARNINGS']
end
namespace :appraisal do
desc "Run the given task for a particular integration's appraisals"
task :integration do
integration = ENV['INTEGRATION']
Appraisal::File.each do |appraisal|
if appraisal.name.include?(integration)
appraisal.install
Appraisal::Command.from_args(appraisal.gemfile_path).run
end
end
exit
end
end
load File.dirname(__FILE__) + '/lib/tasks/state_machine.rake'