mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
More compatibility with Rails master.
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
require File.expand_path('../../rails_app/config/environment', __FILE__)
|
||||
require 'rails/test_help'
|
||||
|
||||
ActiveRecord::Migration.verbose = false
|
||||
ActiveRecord::Base.logger = Logger.new(nil)
|
||||
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
require File.expand_path('../../rails_app/config/environment', __FILE__)
|
||||
require 'rails/test_help'
|
||||
|
||||
DataMapper.auto_migrate!
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
require File.expand_path('../../rails_app/config/environment', __FILE__)
|
||||
require 'rails/test_help'
|
||||
|
||||
Mongoid.configure do |config|
|
||||
config.master = Mongo::Connection.new('127.0.0.1', 27017).db("devise-test-suite")
|
||||
end
|
||||
|
||||
I18n.load_path << File.join(
|
||||
File.dirname(__FILE__), "mongoid", "locale", "en.yml"
|
||||
)
|
||||
|
||||
class ActiveSupport::TestCase
|
||||
setup do
|
||||
User.delete_all
|
||||
|
||||
@@ -28,5 +28,9 @@ module RailsApp
|
||||
|
||||
# Configure sensitive parameters which will be filtered from the log file.
|
||||
config.filter_parameters << :password
|
||||
|
||||
# Cookie settings
|
||||
config.cookie_secret = 'ea942c41850d502f2c8283e26bdc57829f471bb18224ddff0a192c4f32cdf6cb5aa0d82b3a7a7adbeb640c4b06f3aa1cd5f098162d8240f669b39d6b49680571'
|
||||
config.session_store :cookie_store, :key => "_my_app"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3,7 +3,7 @@ begin
|
||||
rescue LoadError
|
||||
require 'rubygems'
|
||||
require 'bundler'
|
||||
Bundler.setup
|
||||
Bundler.setup :default, DEVISE_ORM
|
||||
end
|
||||
|
||||
$:.unshift File.expand_path('../../../../lib', __FILE__)
|
||||
@@ -1,7 +0,0 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Your secret key for verifying the integrity of signed cookies.
|
||||
# If you change this key, all old signed cookies will become invalid!
|
||||
# Make sure the secret is at least 30 characters and all random,
|
||||
# no regular words or you'll be exposed to dictionary attacks.
|
||||
ActionController::Base.cookie_verifier_secret = 'ea942c41850d502f2c8283e26bdc57829f471bb18224ddff0a192c4f32cdf6cb5aa0d82b3a7a7adbeb640c4b06f3aa1cd5f098162d8240f669b39d6b49680571'
|
||||
@@ -1,15 +0,0 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# Your secret key for verifying cookie session data integrity.
|
||||
# If you change this key, all old sessions will become invalid!
|
||||
# Make sure the secret is at least 30 characters and all random,
|
||||
# no regular words or you'll be exposed to dictionary attacks.
|
||||
ActionController::Base.session = {
|
||||
:key => '_rails_app_session',
|
||||
:secret => '0c31f123b2bd4424ac366a7976aaa0696f0c82337c4073a5816a3abc6553293ad14f70cf23acb391954a8ce8cf08aaca3fab21e7642aa52ea212aefa19b7439d'
|
||||
}
|
||||
|
||||
# Use the database for sessions instead of the cookie-based default,
|
||||
# which shouldn't be used to store highly confidential information
|
||||
# (create the session table with "rake db:sessions:create")
|
||||
# ActionController::Base.session_store = :active_record_store
|
||||
@@ -1,11 +1,14 @@
|
||||
ENV["RAILS_ENV"] = "test"
|
||||
DEVISE_ORM = (ENV["DEVISE_ORM"] || :active_record).to_sym
|
||||
|
||||
$:.unshift File.dirname(__FILE__)
|
||||
puts "\n==> Devise.orm = #{DEVISE_ORM.inspect}"
|
||||
|
||||
require File.expand_path('../rails_app/config/application', __FILE__)
|
||||
require File.expand_path("../orm/#{DEVISE_ORM}", __FILE__)
|
||||
require "rails_app/config/environment"
|
||||
require "rails/test_help"
|
||||
require "orm/#{DEVISE_ORM}"
|
||||
|
||||
I18n.load_path << File.expand_path("../support/locale/en.yml", __FILE__)
|
||||
require 'mocha'
|
||||
|
||||
ActionMailer::Base.delivery_method = :test
|
||||
|
||||
Reference in New Issue
Block a user