Sha256: e023ac092d2da4ac88a2e26d8cb07bf213201a5d402da7ce9497c047844fc95f

Contents?: true

Size: 711 Bytes

Versions: 95

Compression:

Stored size: 711 Bytes

Contents

require 'rake/testtask'

desc 'Test the GeoKit plugin.'
Rake::TestTask.new(:test) do |t|
  t.pattern = 'test/**/*_test.rb'
  t.verbose = true
  t.libs << 'test'
end

class EnvTestTask < Rake::TestTask
  attr_accessor :env
  
  def ruby(*args)
    env.each { |key, value| ENV[key] = value } if env
    super
    env.keys.each { |key| ENV.delete(key) } if env
  end
  
end

%w(mysql postgresql sqlserver).each do |configuration|
  EnvTestTask.new("test_#{configuration}") do |t|
    t.pattern = 'test/**/*_test.rb'
    t.verbose = true
    t.env     = { 'DB' => configuration }
    t.libs << 'test'
  end
end

desc 'Test available databases.'
task :test_databases => %w(test_mysql test_postgresql test_sqlserver)

Version data entries

95 entries across 95 versions & 3 rubygems

Version Path
earth-0.11.7 vendor/geokit-rails/test/tasks.rake
earth-0.11.6 vendor/geokit-rails/test/tasks.rake
earth-0.11.5 vendor/geokit-rails/test/tasks.rake
earth-0.11.4 vendor/geokit-rails/test/tasks.rake
earth-0.11.3 vendor/geokit-rails/test/tasks.rake
earth-0.11.2 vendor/geokit-rails/test/tasks.rake
earth-0.11.1 vendor/geokit-rails/test/tasks.rake
earth-0.11.0 vendor/geokit-rails/test/tasks.rake
earth-0.7.0 vendor/geokit-rails/test/tasks.rake
earth-0.6.6 vendor/geokit-rails/test/tasks.rake
earth-0.6.5 vendor/geokit-rails/test/tasks.rake
earth-0.6.4 vendor/geokit-rails/test/tasks.rake
earth-0.6.3 vendor/geokit-rails/test/tasks.rake
earth-0.6.2 vendor/geokit-rails/test/tasks.rake
earth-0.6.1 vendor/geokit-rails/test/tasks.rake
earth-0.6.0 vendor/geokit-rails/test/tasks.rake
earth-0.5.4 vendor/geokit-rails/test/tasks.rake
earth-0.5.3 vendor/geokit-rails/test/tasks.rake
earth-0.5.2 vendor/geokit-rails/test/tasks.rake
earth-0.5.0 vendor/geokit-rails/test/tasks.rake