Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 28 lines (24 sloc) 0.636 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
require 'rake/testtask'

desc 'Default: run unit tests.'
task :default => :test

desc 'Test the will_paginate plugin.'
Rake::TestTask.new(:test) do |t|
  if ENV['DB'] and ENV['DB'] != 'sqlite3'
    t.pattern = %w[test/finder_test.rb]
  else
    t.pattern = 'test/**/*_test.rb'
  end
  t.libs << 'test'
end

namespace :test do ||
  desc 'Test only Rails integration'
  Rake::TestTask.new(:rails) do |t|
    t.pattern = %w[test/finder_test.rb test/view_test.rb]
    t.libs << 'test'
  end

  desc 'Test only ActiveRecord integration'
  Rake::TestTask.new(:db) do |t|
    t.pattern = %w[test/finder_test.rb]
    t.libs << 'test'
  end
end
Something went wrong with that request. Please try again.