1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00
paper-trail-gem--paper_trail/Rakefile

31 lines
801 B
Text
Raw Normal View History

2010-10-15 07:53:33 -04:00
require 'bundler'
Bundler::GemHelper.install_tasks
desc 'Set a relevant database.yml for testing'
task :prepare do
ENV["DB"] ||= "sqlite"
if RUBY_VERSION >= '1.9'
FileUtils.cp "test/dummy/config/database.#{ENV["DB"]}.yml", "test/dummy/config/database.yml"
else
require 'ftools'
File.cp "test/dummy/config/database.#{ENV["DB"]}.yml", "test/dummy/config/database.yml"
end
end
require 'rake/testtask'
desc 'Run tests on PaperTrail with Test::Unit.'
2009-05-27 11:21:20 -04:00
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
2011-02-08 12:16:35 -05:00
t.verbose = false
2009-05-27 11:21:20 -04:00
end
require 'rspec/core/rake_task'
desc 'Run PaperTrail specs for the RSpec helper.'
RSpec::Core::RakeTask.new(:spec)
2013-08-30 16:14:22 -04:00
desc 'Default: run all available test suites'
task :default => [:prepare, :test, :spec]