webrat/spec/spec_helper.rb

21 lines
685 B
Ruby
Raw Normal View History

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"])
require File.join(File.dirname(__FILE__), "webrat", "#{ENV["TEST_MODE"]}", "helper.rb")
2008-04-18 12:19:13 +00:00
else
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")
require File.expand_path(File.dirname(__FILE__) + "/../lib/webrat/rails")
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