Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (16 sloc) 660 Bytes
require 'rake'
require 'rake/testtask'
desc 'Run Devise tests using Sequel. Specify path to devise with DEVISE_PATH'
Rake::TestTask.new(:test) do |test|
ENV['DEVISE_ORM'] ||= 'sequel'
ENV['DEVISE_PATH'] ||= File.expand_path('../devise')
unless File.exist?(ENV['DEVISE_PATH'])
puts "Specify the path to devise (e.g. rake DEVISE_PATH=/path/to/devise). Not found at #{ENV['DEVISE_PATH']}"
exit
end
test.libs << 'lib' << 'test'
test.libs << "#{ENV['DEVISE_PATH']}/lib"
test.libs << "#{ENV['DEVISE_PATH']}/test"
test.test_files = FileList["#{ENV['DEVISE_PATH']}/test/**/*_test.rb"] + FileList['test/**/*_test.rb']
test.verbose = true
end