From c0220232c76a5ae72f0416da7c0d4d6ad2776f4e Mon Sep 17 00:00:00 2001 From: Mike Gaffney Date: Tue, 13 Jan 2009 00:13:17 -0600 Subject: [PATCH] broke selenium mode tests out into a seperate file. --- spec/integration/rails/Rakefile | 16 ++++++++++------ .../rails/test/integration/webrat_test.rb | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/spec/integration/rails/Rakefile b/spec/integration/rails/Rakefile index f8e09ae..4149919 100644 --- a/spec/integration/rails/Rakefile +++ b/spec/integration/rails/Rakefile @@ -9,14 +9,18 @@ require 'rake/rdoctask' require 'tasks/rails' -desc "runs the test::unit based tests in webrat mode" -task :test_unit_webrat do +Rake::TestTask.new(:test_unit_webrat => "db:test:prepare") do |t| ENV['WEBRAT_INTEGRATION_MODE'] = 'webrat' - Rake::Task['test:integration'].invoke + t.libs << "test" + t.pattern = 'test/integration/**/*_test.rb' + t.verbose = true end +Rake::Task['test_unit_webrat'].comment = "runs the test::unit based tests in webrat mode" -desc "runs the test::unit based tests in selenium mode" -task :test_unit_selenium do +Rake::TestTask.new(:test_unit_selenium => "db:test:prepare") do |t| ENV['WEBRAT_INTEGRATION_MODE'] = 'selenium' - Rake::Task['test:integration'].invoke + t.libs << "test" + t.pattern = 'test/integration/**/*_test.rb' + t.verbose = true end +Rake::Task['test_unit_selenium'].comment = "runs the test::unit based tests in selenium mode" \ No newline at end of file diff --git a/spec/integration/rails/test/integration/webrat_test.rb b/spec/integration/rails/test/integration/webrat_test.rb index f695f27..d6ad832 100644 --- a/spec/integration/rails/test/integration/webrat_test.rb +++ b/spec/integration/rails/test/integration/webrat_test.rb @@ -16,7 +16,7 @@ class WebratTest < ActionController::IntegrationTest test "should follow internal redirects" do visit internal_redirect_path - assert_contain("OK") + assert response_body.include?("OK") end test "should not follow external redirects" do