Sha256: 332cd9a1cbb8b1f6b8e00b520976935b19793c527a2d0a5564806be07b6e5581

Contents?: true

Size: 667 Bytes

Versions: 3

Compression:

Stored size: 667 Bytes

Contents

require 'yaml' unless Object::const_defined?('YAML')

namespace :test do
  
  databases = YAML.load(File.read(File.dirname(__FILE__) + '/../test/database.yml'))  
  
  desc "Run testsuite on all configured databases in test/database.yml"
  task(:all => databases.keys.map { |db| db.to_sym }) do
    puts "\nFinished testing on all configured databases!"
    puts "(Configure databases by adjusting test/database.yml)"
  end
  
  databases.each do |database, config|
    desc "Run testsuite on #{database} database."
    task database.to_sym do
      puts "Running testsuite on #{database} database...\n\n"
      sh "rake test DATABASE=#{database}"
    end
  end  
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
japetheape-scoped_search-1.1.1 tasks/database_tests.rake
wvanbergen-scoped_search-1.1.0 tasks/database_tests.rake
wvanbergen-scoped_search-1.2.0 tasks/database_tests.rake