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-04-18 12:37:03 +00:00
|
|
|
if ["rails","merb"].include?(ENV["TEST_MODE"])
|
2008-10-12 00:09:15 +00:00
|
|
|
require File.join(File.dirname(__FILE__), "webrat", "#{ENV["TEST_MODE"]}", "helper.rb")
|
2008-04-18 12:19:13 +00:00
|
|
|
else
|
2008-10-12 00:09:15 +00:00
|
|
|
puts "Please set the environment variable TEST_MODE to either 'rails' or 'merb'."
|
|
|
|
$stdout.flush
|
|
|
|
exit 1
|
2008-04-04 13:19:14 +00:00
|
|
|
end
|
2008-04-18 12:37:03 +00:00
|
|
|
|
2008-03-02 20:14:52 +00:00
|
|
|
require File.expand_path(File.dirname(__FILE__) + "/../lib/webrat")
|
2008-08-27 00:21:27 +00:00
|
|
|
require File.expand_path(File.dirname(__FILE__) + "/../lib/webrat/rails")
|
2008-05-12 03:58:20 +00:00
|
|
|
require 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-03-02 20:14:52 +00:00
|
|
|
end
|