diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index dfddaf0..95902fd 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,14 +9,6 @@ $LOAD_PATH << File.join(PROJECT_ROOT, 'lib') Dir[File.join(PROJECT_ROOT, 'spec', 'support', '**', '*.rb')].each { |file| require(file) } -spec_dir = nil -$:.detect do |dir| - if File.exists? File.join(dir, "capybara.rb") - spec_dir = File.expand_path(File.join(dir,"..","spec")) - $:.unshift( spec_dir ) - end -end - require 'capybara/webkit' connection = Capybara::Webkit::Connection.new(:socket_class => TCPSocket) $webkit_browser = Capybara::Webkit::Browser.new(connection) @@ -25,7 +17,7 @@ if ENV['DEBUG'] $webkit_browser.enable_logging end -require File.join(spec_dir, "spec_helper") +require 'capybara/spec/spec_helper' Capybara.register_driver :reusable_webkit do |app| Capybara::Webkit::Driver.new(app, :browser => $webkit_browser)