Some explicit requires of RubyGems are necessary for integration tests.

Should not affect the way Webrat behaves as a library.
This commit is contained in:
Damian Janowski 2010-04-12 23:30:56 -03:00
parent 10c70a37de
commit deccefa2c3
5 changed files with 12 additions and 9 deletions

View File

@ -1,5 +1,3 @@
require "rubygems"
begin
require 'spec/rake/spectask'
rescue LoadError
@ -90,14 +88,14 @@ namespace :spec do
namespace :rails do
task :selenium do
Dir.chdir "spec/integration/rails" do
result = system "rake test_unit:selenium"
result = system "rake -rubygems test_unit:selenium"
raise "Rails integration tests failed" unless result
end
end
task :webrat do
Dir.chdir "spec/integration/rails" do
result = system "rake test_unit:rails"
result = system "rake -rubygems test_unit:rails"
raise "Rails integration tests failed" unless result
end
end
@ -106,7 +104,7 @@ namespace :spec do
desc "Run the Merb integration specs"
task :merb do
Dir.chdir "spec/integration/merb" do
result = system "rake spec"
result = system "rake -rubygems spec"
raise "Merb integration tests failed" unless result
end
end
@ -114,7 +112,7 @@ namespace :spec do
desc "Run the Sinatra integration specs"
task :sinatra do
Dir.chdir "spec/integration/sinatra" do
result = system "rake test"
result = system "rake -rubygems test"
raise "Sinatra integration tests failed" unless result
end
end
@ -122,7 +120,7 @@ namespace :spec do
desc "Run the Sinatra integration specs"
task :rack do
Dir.chdir "spec/integration/rack" do
result = system "rake test"
result = system "rake -rubygems test"
raise "Rack integration tests failed" unless result
end
end
@ -130,7 +128,7 @@ namespace :spec do
desc "Run the Mechanize integration specs"
task :mechanize do
Dir.chdir "spec/integration/mechanize" do
result = system "rake spec"
result = system "rake -rubygems spec"
raise "Mechanize integration tests failed" unless result
end
end
@ -142,4 +140,4 @@ task :whitespace do
sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;}
end
task :default => :spec
task :default => :spec

View File

@ -1,3 +1,4 @@
require "rubygems"
require "spec"
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../../../../lib"

View File

@ -1,3 +1,5 @@
require "rubygems"
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../../../../lib"
# Add the local gems dir if found within the app root; any dependencies loaded

View File

@ -1,3 +1,4 @@
require "rubygems"
require File.dirname(__FILE__) + "/helper"
class WebratRackTest < Test::Unit::TestCase

View File

@ -1,3 +1,4 @@
require "rubygems"
require File.dirname(__FILE__) + "/test_helper"
require File.dirname(__FILE__) + "/../classic_app"