2008-03-02 20:14:52 +00:00
|
|
|
require "rubygems"
|
2008-04-23 14:54:07 +00:00
|
|
|
require "spec"
|
2008-10-06 11:52:36 +00:00
|
|
|
require "spec/interop/test"
|
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 05:06:49 +00:00
|
|
|
require File.expand_path(File.dirname(__FILE__) + "/../lib/webrat")
|
|
|
|
require File.dirname(__FILE__) + "/fakes/test_session"
|
2008-04-04 13:19:14 +00:00
|
|
|
|
2008-10-21 05:06:49 +00:00
|
|
|
if ["rails","merb"].include?(ENV["TEST_MODE"])
|
|
|
|
require File.join(File.dirname(__FILE__), "webrat", "#{ENV["TEST_MODE"]}", "helper.rb")
|
|
|
|
else
|
|
|
|
puts "Assuming test mode is Rails... for Merb set TEST_MODE=merb and rerun."
|
|
|
|
ENV["TEST_MODE"] = 'rails'
|
|
|
|
require File.join(File.dirname(__FILE__), "webrat", "#{ENV["TEST_MODE"]}", "helper.rb")
|
2008-04-04 13:19:14 +00:00
|
|
|
end
|
2008-03-02 20:14:52 +00:00
|
|
|
|
2008-10-21 05:06:49 +00:00
|
|
|
|
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
|