2008-03-02 20:14:52 +00:00
|
|
|
require "rubygems"
|
2008-04-23 14:54:07 +00:00
|
|
|
require "spec"
|
2008-07-25 23:11:56 +00:00
|
|
|
|
2008-03-02 20:14:52 +00:00
|
|
|
# gem install redgreen for colored test output
|
|
|
|
begin require "redgreen" unless ENV['TM_CURRENT_LINE']; rescue LoadError; end
|
|
|
|
|
2008-10-21 12:05:35 +00:00
|
|
|
require File.expand_path(File.dirname(__FILE__) + "/../lib/webrat")
|
2008-10-25 16:42:38 +00:00
|
|
|
require File.expand_path(File.dirname(__FILE__) + "/fakes/test_session")
|
2008-04-23 14:54:07 +00:00
|
|
|
|
|
|
|
Spec::Runner.configure do |config|
|
2008-07-25 23:11:56 +00:00
|
|
|
# Nothing to configure yet
|
2008-11-14 05:58:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
2008-11-15 00:32:05 +00:00
|
|
|
class Webrat::Core::Configuration
|
2008-11-14 05:58:52 +00:00
|
|
|
@@previous_config = nil
|
|
|
|
|
|
|
|
def self.cache_config_for_test
|
2008-11-15 00:32:05 +00:00
|
|
|
@@configuration = Webrat::Core::Configuration.configuration
|
2008-11-14 05:58:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.reset_for_test
|
|
|
|
@@configuration = @@previous_config if @@previous_config
|
|
|
|
end
|
2008-03-02 20:14:52 +00:00
|
|
|
end
|