2009-10-09 20:11:58 -04:00
|
|
|
ENV["RAILS_ENV"] = "test"
|
2009-12-21 09:29:58 -05:00
|
|
|
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
2009-12-21 15:10:23 -05:00
|
|
|
|
|
|
|
puts "\n==> Devise.orm = #{DEVISE_ORM.inspect}"
|
2010-02-17 04:11:43 -05:00
|
|
|
|
|
|
|
require File.expand_path('../rails_app/config/application', __FILE__)
|
2010-02-16 08:31:49 -05:00
|
|
|
require File.expand_path("../orm/#{DEVISE_ORM}", __FILE__)
|
2009-10-07 20:46:40 -04:00
|
|
|
|
2010-02-17 04:11:43 -05:00
|
|
|
require 'mocha'
|
2009-09-17 08:24:33 -04:00
|
|
|
|
2009-09-17 20:29:13 -04:00
|
|
|
ActionMailer::Base.delivery_method = :test
|
|
|
|
ActionMailer::Base.perform_deliveries = true
|
2009-10-08 10:31:51 -04:00
|
|
|
ActionMailer::Base.default_url_options[:host] = 'test.com'
|
2009-09-17 20:29:13 -04:00
|
|
|
|
2009-10-07 20:46:40 -04:00
|
|
|
Webrat.configure do |config|
|
|
|
|
config.mode = :rails
|
2009-11-22 19:19:29 -05:00
|
|
|
config.open_error_files = false
|
2010-02-16 08:31:49 -05:00
|
|
|
end
|
|
|
|
|
2010-02-16 08:57:10 -05:00
|
|
|
# Add support to load paths so we can overwrite broken webrat setup
|
|
|
|
$:.unshift File.expand_path('../support', __FILE__)
|
|
|
|
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|