./Rakefile in exact4r-0.9.3 vs ./Rakefile in exact4r-1.0

- old
+ new

@@ -1,16 +1,48 @@ require 'rake/rdoctask' require 'rake/testtask' require "rubygems" require "rake/gempackagetask" -task :default => :test +task :default => :'test:chase' -desc 'Run all the tests' -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.pattern = 'test/**/*_test.rb' - t.verbose = true +namespace :test do + + desc 'Run all tests against all processors. Use LOCATION to specify web service URL.' + task :all do + %w(chase tsys emergis moneris).each do |processor| + 3.times { puts } + puts "#-----------------------" + puts "# Testing: " + processor + puts "#-----------------------" + + ENV['PROCESSOR'] = processor + begin + Rake::Task[:'test:processor'].execute + rescue + # don't care, just run it again. can examine output later + end + end + end + + desc 'Run all tests against Chase processor and Production web service. Use LOCATION to specify web service URL.' + task :chase do + ENV['PROCESSOR'] = 'chase' + ENV['LOCATION'] = 'PROD' + begin + Rake::Task[:'test:processor'].execute + rescue + # don't care, just run it again. can examine output later + end + end + + desc 'Run all the tests against a specific processor. Use LOCATION to specify web service URL.' + Rake::TestTask.new(:processor) do |t| + t.libs << 'lib' + t.pattern = 'test/**/*_test.rb' + t.verbose = true + end + end desc "Build the RDoc" Rake::RDocTask.new { |rdoc| rdoc.rdoc_dir = 'doc'