Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 41 lines (31 sloc) 1.04 kb
16721fd Aaron Pfeifer Release gems via rake-gemcutter instead of rubyforge
obrie authored
1 require 'rubygems'
3b4c40e Aaron Pfeifer Small tweaks to bundler usage
obrie authored
2 require 'bundler'
3 Bundler.setup
a7c1726 Aaron Pfeifer Use appraisal for testing integrations. Closes #105
obrie authored
4
16721fd Aaron Pfeifer Release gems via rake-gemcutter instead of rubyforge
obrie authored
5 require 'rake'
03ead94 Aaron Pfeifer Initial import.
obrie authored
6 require 'rake/testtask'
7
3b4c40e Aaron Pfeifer Small tweaks to bundler usage
obrie authored
8 require 'appraisal'
9
c7fe83a Aaron Pfeifer Add code coverage tasks
obrie authored
10 desc 'Default: run all tests.'
11 task :default => :test
12
313ae41 Aaron Pfeifer Move gem specification to gemspec and remove gemspec rake task
obrie authored
13 desc "Test state_machine."
c7fe83a Aaron Pfeifer Add code coverage tasks
obrie authored
14 Rake::TestTask.new(:test) do |t|
a7c1726 Aaron Pfeifer Use appraisal for testing integrations. Closes #105
obrie authored
15 integration = %w(active_model active_record data_mapper mongoid mongo_mapper sequel).detect do |name|
16 Bundler.default_gemfile.to_s.include?(name)
17 end
18
c7fe83a Aaron Pfeifer Add code coverage tasks
obrie authored
19 t.libs << 'lib'
a7c1726 Aaron Pfeifer Use appraisal for testing integrations. Closes #105
obrie authored
20 t.test_files = integration ? Dir["test/unit/integrations/#{integration}_test.rb"] : Dir['test/{functional,unit}/*_test.rb'] + ['test/unit/integrations/base_test.rb']
c7fe83a Aaron Pfeifer Add code coverage tasks
obrie authored
21 t.verbose = true
22 end
23
a7c1726 Aaron Pfeifer Use appraisal for testing integrations. Closes #105
obrie authored
24 namespace :appraisal do
25 desc "Run the given task for a particular integration's appraisals"
26 task :integration do
27 integration = ENV['INTEGRATION']
28
29 Appraisal::File.each do |appraisal|
30 if appraisal.name.include?(integration)
31 appraisal.install
32 Appraisal::Command.from_args(appraisal.gemfile_path).run
33 end
34 end
35
36 exit
37 end
38 end
39
d361b00 Fix Rakefile not loading in Ruby 1.9.2
Andrea Longhi authored
40 load File.dirname(__FILE__) + '/lib/tasks/state_machine.rake'
Something went wrong with that request. Please try again.