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
|
|
|
|
2010-03-28 01:15:52 -04:00
|
|
|
$:.unshift File.dirname(__FILE__)
|
2009-12-21 15:10:23 -05:00
|
|
|
puts "\n==> Devise.orm = #{DEVISE_ORM.inspect}"
|
2010-02-17 04:11:43 -05:00
|
|
|
|
2010-03-28 01:15:52 -04:00
|
|
|
require "rails_app/config/environment"
|
|
|
|
require "rails/test_help"
|
|
|
|
require "orm/#{DEVISE_ORM}"
|
2009-10-07 20:46:40 -04:00
|
|
|
|
2010-03-28 01:15:52 -04:00
|
|
|
I18n.load_path << File.expand_path("../support/locale/en.yml", __FILE__)
|
2010-02-17 04:11:43 -05:00
|
|
|
require 'mocha'
|
2009-09-17 08:24:33 -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-10-14 18:44:21 -04:00
|
|
|
Devise::OmniAuth.test_mode!
|
2010-07-13 04:09:55 -04:00
|
|
|
|
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 }
|