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:
parent
10c70a37de
commit
deccefa2c3
16
Rakefile
16
Rakefile
@ -1,5 +1,3 @@
|
|||||||
require "rubygems"
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'spec/rake/spectask'
|
require 'spec/rake/spectask'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
@ -90,14 +88,14 @@ namespace :spec do
|
|||||||
namespace :rails do
|
namespace :rails do
|
||||||
task :selenium do
|
task :selenium do
|
||||||
Dir.chdir "spec/integration/rails" 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
|
raise "Rails integration tests failed" unless result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
task :webrat do
|
task :webrat do
|
||||||
Dir.chdir "spec/integration/rails" 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
|
raise "Rails integration tests failed" unless result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -106,7 +104,7 @@ namespace :spec do
|
|||||||
desc "Run the Merb integration specs"
|
desc "Run the Merb integration specs"
|
||||||
task :merb do
|
task :merb do
|
||||||
Dir.chdir "spec/integration/merb" do
|
Dir.chdir "spec/integration/merb" do
|
||||||
result = system "rake spec"
|
result = system "rake -rubygems spec"
|
||||||
raise "Merb integration tests failed" unless result
|
raise "Merb integration tests failed" unless result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -114,7 +112,7 @@ namespace :spec do
|
|||||||
desc "Run the Sinatra integration specs"
|
desc "Run the Sinatra integration specs"
|
||||||
task :sinatra do
|
task :sinatra do
|
||||||
Dir.chdir "spec/integration/sinatra" do
|
Dir.chdir "spec/integration/sinatra" do
|
||||||
result = system "rake test"
|
result = system "rake -rubygems test"
|
||||||
raise "Sinatra integration tests failed" unless result
|
raise "Sinatra integration tests failed" unless result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -122,7 +120,7 @@ namespace :spec do
|
|||||||
desc "Run the Sinatra integration specs"
|
desc "Run the Sinatra integration specs"
|
||||||
task :rack do
|
task :rack do
|
||||||
Dir.chdir "spec/integration/rack" do
|
Dir.chdir "spec/integration/rack" do
|
||||||
result = system "rake test"
|
result = system "rake -rubygems test"
|
||||||
raise "Rack integration tests failed" unless result
|
raise "Rack integration tests failed" unless result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -130,7 +128,7 @@ namespace :spec do
|
|||||||
desc "Run the Mechanize integration specs"
|
desc "Run the Mechanize integration specs"
|
||||||
task :mechanize do
|
task :mechanize do
|
||||||
Dir.chdir "spec/integration/mechanize" do
|
Dir.chdir "spec/integration/mechanize" do
|
||||||
result = system "rake spec"
|
result = system "rake -rubygems spec"
|
||||||
raise "Mechanize integration tests failed" unless result
|
raise "Mechanize integration tests failed" unless result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -142,4 +140,4 @@ task :whitespace do
|
|||||||
sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;}
|
sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;}
|
||||||
end
|
end
|
||||||
|
|
||||||
task :default => :spec
|
task :default => :spec
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
require "rubygems"
|
||||||
require "spec"
|
require "spec"
|
||||||
|
|
||||||
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../../../../lib"
|
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../../../../lib"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
require "rubygems"
|
||||||
|
|
||||||
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../../../../lib"
|
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../../../../lib"
|
||||||
|
|
||||||
# Add the local gems dir if found within the app root; any dependencies loaded
|
# Add the local gems dir if found within the app root; any dependencies loaded
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
require "rubygems"
|
||||||
require File.dirname(__FILE__) + "/helper"
|
require File.dirname(__FILE__) + "/helper"
|
||||||
|
|
||||||
class WebratRackTest < Test::Unit::TestCase
|
class WebratRackTest < Test::Unit::TestCase
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
require "rubygems"
|
||||||
require File.dirname(__FILE__) + "/test_helper"
|
require File.dirname(__FILE__) + "/test_helper"
|
||||||
require File.dirname(__FILE__) + "/../classic_app"
|
require File.dirname(__FILE__) + "/../classic_app"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user