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.2.2 vendor/geokit-rails/test/tasks.rake
earth-0.2.1 vendor/geokit-rails/test/tasks.rake
earth-0.2.0 vendor/geokit-rails/test/tasks.rake
earth-0.1.4 vendor/geokit-rails/test/tasks.rake
earth-0.1.3 vendor/geokit-rails/test/tasks.rake
earth-0.1.2 vendor/geokit-rails/test/tasks.rake
earth-0.1.1 vendor/geokit-rails/test/tasks.rake
earth-0.1.0 vendor/geokit-rails/test/tasks.rake
earth-0.0.43 vendor/geokit-rails/test/tasks.rake
earth-0.0.42 vendor/geokit-rails/test/tasks.rake
earth-0.0.41 vendor/geokit-rails/test/tasks.rake
earth-0.0.40 vendor/geokit-rails/test/tasks.rake
earth-0.0.39 vendor/geokit-rails/test/tasks.rake
earth-0.0.38 vendor/geokit-rails/test/tasks.rake
earth-0.0.37 vendor/geokit-rails/test/tasks.rake
earth-0.0.36 vendor/geokit-rails/test/tasks.rake
earth-0.0.35 vendor/geokit-rails/test/tasks.rake
earth-0.0.34 vendor/geokit-rails/test/tasks.rake
earth-0.0.33 vendor/geokit-rails/test/tasks.rake
earth-0.0.32 vendor/geokit-rails/test/tasks.rake