Sha256: 58e20638258ce14a1453c2ac0d4b6bd013e7a3b36fcd4084ee77f35a8ee3c07e

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

require 'bundler/gem_tasks'
require 'rake/testtask'
require_relative 'test/support/paths_sqlserver'
require_relative 'test/support/rake_helpers'

task test: ['test:dblib']
task default: [:test]

namespace :test do

  %w(dblib odbc).each do |mode|

    Rake::TestTask.new(mode) do |t|
      t.libs = ARTest::SQLServer.test_load_paths
      t.test_files = test_files
      t.warning = !!ENV['WARNING']
      t.verbose = true
    end

  end

  task 'dblib:env' do
    ENV['ARCONN'] = 'dblib'
  end

  task 'odbc:env' do
    ENV['ARCONN'] = 'odbc'
  end

end

task 'test:dblib' => 'test:dblib:env'
task 'test:odbc' => 'test:odbc:env'

namespace :profile do
  ['dblib', 'odbc'].each do |mode|
    namespace mode.to_sym do
      Dir.glob('test/profile/*_profile_case.rb').sort.each do |test_file|
        profile_case = File.basename(test_file).sub('_profile_case.rb', '')
        Rake::TestTask.new(profile_case) do |t|
          t.libs = ARTest::SQLServer.test_load_paths
          t.test_files = [test_file]
          t.verbose = true
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
activerecord-sqlserver-adapter-4.2.8 Rakefile
activerecord-sqlserver-adapter-4.2.6 Rakefile
activerecord-sqlserver-adapter-4.2.5 Rakefile
activerecord-sqlserver-adapter-4.2.4 Rakefile
activerecord-sqlserver-adapter-4.2.3 Rakefile
activerecord-sqlserver-adapter-4.2.2 Rakefile
activerecord-sqlserver-adapter-4.2.1 Rakefile
activerecord-sqlserver-adapter-4.2.0 Rakefile
activerecord-sqlserver-adapter-4.2.0.pre Rakefile