Rakefile in paperclip_database-2.2.2 vs Rakefile in paperclip_database-2.3.0
- old
+ new
@@ -1,29 +1,27 @@
require 'bundler/gem_tasks'
require 'appraisal'
-require 'rake/testtask'
+require 'rspec/core/rake_task'
require 'cucumber/rake/task'
desc 'Default: clean, appraisal:install, all.'
task :default => [:clean, :all]
desc 'Test the paperclip_database plugin under all supported Rails versions.'
task :all do |t|
if ENV['BUNDLE_GEMFILE']
- exec('rake test cucumber')
+ exec('rake spec cucumber')
else
+ exec("rm gemfiles/*.lock")
+ Rake::Task["appraisal:gemfiles"].execute
Rake::Task["appraisal:install"].execute
- exec('rake appraisal test cucumber')
+ exec('rake appraisal')
end
end
desc 'Test the paperclip_database plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib' << 'profile'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
+RSpec::Core::RakeTask.new(:spec)
desc 'Run integration test'
Cucumber::Rake::Task.new do |t|
t.cucumber_opts = %w{--format progress}
end
@@ -38,9 +36,7 @@
task :clean do |t|
FileUtils.rm_rf "doc"
FileUtils.rm_rf "tmp"
FileUtils.rm_rf "pkg"
FileUtils.rm_rf "public"
- FileUtils.rm "test/debug.log" rescue nil
- FileUtils.rm "test/paperclip_database.db" rescue nil
Dir.glob("paperclip_database-*.gem").each{|f| FileUtils.rm f }
end