2009-10-10 00:11:58 +00:00
|
|
|
ENV["RAILS_ENV"] = "test"
|
2009-12-21 14:29:58 +00:00
|
|
|
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
2009-12-21 20:10:23 +00:00
|
|
|
|
2010-03-28 05:15:52 +00:00
|
|
|
$:.unshift File.dirname(__FILE__)
|
2009-12-21 20:10:23 +00:00
|
|
|
puts "\n==> Devise.orm = #{DEVISE_ORM.inspect}"
|
2010-02-17 09:11:43 +00:00
|
|
|
|
2010-03-28 05:15:52 +00:00
|
|
|
require "rails_app/config/environment"
|
|
|
|
require "rails/test_help"
|
|
|
|
require "orm/#{DEVISE_ORM}"
|
2009-10-08 00:46:40 +00:00
|
|
|
|
2010-03-28 05:15:52 +00:00
|
|
|
I18n.load_path << File.expand_path("../support/locale/en.yml", __FILE__)
|
2010-02-17 09:11:43 +00:00
|
|
|
require 'mocha'
|
2009-09-17 12:24:33 +00:00
|
|
|
|
2009-10-08 00:46:40 +00:00
|
|
|
Webrat.configure do |config|
|
|
|
|
config.mode = :rails
|
2009-11-23 00:19:29 +00:00
|
|
|
config.open_error_files = false
|
2010-02-16 13:31:49 +00:00
|
|
|
end
|
|
|
|
|
2010-07-15 16:13:55 +00:00
|
|
|
Devise::Oauth.test_mode!
|
2010-07-13 08:09:55 +00:00
|
|
|
|
2010-02-16 13:57:10 +00: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 }
|