Cleaning up some requires to get rid of double-includes during spec runs

This commit is contained in:
Bryan Helmkamp 2008-11-16 21:25:29 -05:00
parent f2f8bae190
commit 50762b6f5a
5 changed files with 10 additions and 6 deletions

View File

@ -5,7 +5,7 @@ require "rake/clean"
require 'spec'
require 'spec/rake/spectask'
require 'spec/rake/verify_rcov'
require './lib/webrat.rb'
require File.expand_path('./lib/webrat.rb')
##############################################################################
# Package && release

View File

@ -1,5 +1,3 @@
require "webrat"
module Webrat
class RailsSession < Session #:nodoc:

View File

@ -4,9 +4,14 @@ require "spec"
# gem install redgreen for colored test output
begin require "redgreen" unless ENV['TM_CURRENT_LINE']; rescue LoadError; end
require File.expand_path(File.dirname(__FILE__) + "/../lib/webrat")
webrat_path = File.expand_path(File.dirname(__FILE__) + "/../lib/")
$LOAD_PATH.unshift(webrat_path) unless $LOAD_PATH.include?(webrat_path)
require "webrat"
require File.expand_path(File.dirname(__FILE__) + "/fakes/test_session")
require "merb-core"
Spec::Runner.configure do |config|
# Nothing to configure yet
end

View File

@ -1,2 +1,2 @@
require 'merb-core'
require File.expand_path(File.dirname(__FILE__) + "/../../../lib/webrat/merb")
require "webrat/merb"

View File

@ -1,5 +1,6 @@
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
require File.expand_path(File.dirname(__FILE__) + "/helper")
require "webrat/merb"
describe Webrat::Session do