From a8a63472bc8387413ef1d3016bede346f3936757 Mon Sep 17 00:00:00 2001 From: Mike Gaffney Date: Mon, 12 Jan 2009 22:30:03 -0600 Subject: [PATCH] breaking the test mode out into a specific test modes --- Rakefile | 2 +- spec/integration/rails/Rakefile | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 3a147ba..b7d127e 100644 --- a/Rakefile +++ b/Rakefile @@ -111,7 +111,7 @@ namespace :spec do desc "Run the Rails integration specs" task :rails do Dir.chdir "spec/integration/rails" do - result = system "rake test:integration" + result = system "rake test_unit_webrat" raise "Rails integration tests failed" unless result end end diff --git a/spec/integration/rails/Rakefile b/spec/integration/rails/Rakefile index 3bb0e85..b0269ec 100644 --- a/spec/integration/rails/Rakefile +++ b/spec/integration/rails/Rakefile @@ -8,3 +8,15 @@ require 'rake/testtask' require 'rake/rdoctask' require 'tasks/rails' + +desc "runs the test::unit based tests in webrat mode" +task :test_unit_webrat do + ENV['WEBRAT_INTEGRATION_MODE'] = 'webrat' + Rake::Task['test:integration'].invoke +end + +desc "runs the test::unit based tests in selenium mode" +task :test_unit_webrat do + ENV['WEBRAT_INTEGRATION_MODE'] = 'selenium' + Rake::Task['test:integration'].invoke +end