webrat/spec/spec_helper.rb

23 lines
727 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"
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
require File.expand_path(File.dirname(__FILE__) + "/../lib/webrat")
require File.dirname(__FILE__) + "/fakes/test_session"
2008-04-04 13:19:14 +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-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