Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some explicit requires of RubyGems are necessary for integration tests.

Should not affect the way Webrat behaves as a library.
  • Loading branch information...
commit deccefa2c36bfeca7fde4f829076dd85acca12aa 1 parent 10c70a3
Damian Janowski djanowski authored
16 Rakefile
View
@@ -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
1  spec/integration/mechanize/spec/spec_helper.rb
View
@@ -1,3 +1,4 @@
+require "rubygems"
require "spec"
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../../../../lib"
2  spec/integration/merb/spec/spec_helper.rb
View
@@ -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
1  spec/integration/rack/test/webrat_rack_test.rb
View
@@ -1,3 +1,4 @@
+require "rubygems"
require File.dirname(__FILE__) + "/helper"
class WebratRackTest < Test::Unit::TestCase
1  spec/integration/sinatra/test/classic_app_test.rb
View
@@ -1,3 +1,4 @@
+require "rubygems"
require File.dirname(__FILE__) + "/test_helper"
require File.dirname(__FILE__) + "/../classic_app"
Please sign in to comment.
Something went wrong with that request. Please try again.