Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (35 sloc) 1.05 KB
require 'bundler/gem_tasks'
require 'appraisal'
require 'rake/testtask'
require 'cucumber/rake/task'
desc 'Default: run unit tests.'
task :default => [:clean, 'appraisal:install', :all]
desc 'Test the paperclip plugin under all supported Rails versions.'
task :all do |t|
exec('rake appraisal test cucumber')
desc 'Test the paperclip plugin.' do |t|
t.libs << 'lib' << 'profile'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
desc 'Run integration test' do |t|
t.cucumber_opts = %w{--format progress}
desc 'Start an IRB session with all necessary files required.'
task :shell do |t|
chdir File.dirname(__FILE__)
exec 'irb -I lib/ -I lib/paperclip -r rubygems -r active_record -r tempfile -r init'
desc 'Clean up files.'
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.db" rescue nil
Dir.glob("paperclip-*.gem").each{|f| FileUtils.rm f }
Something went wrong with that request. Please try again.