1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/test/test_helper.rb

45 lines
1.1 KiB
Ruby
Raw Normal View History

ENV["RAILS_ENV"] = "test"
require File.join(File.dirname(__FILE__), 'rails_app', 'config', 'environment')
require 'test_help'
require 'webrat'
2009-11-24 09:54:18 -05:00
require 'mocha'
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
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'
ActiveRecord::Migration.verbose = false
ActiveRecord::Base.logger = Logger.new(nil)
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
ActiveRecord::Schema.define(:version => 1) do
[:users, :admins, :accounts].each do |table|
create_table table do |t|
t.authenticatable :null => table == :admins
2009-10-20 22:09:26 -04:00
if table != :admin
t.string :username
2009-10-20 22:09:26 -04:00
t.confirmable
t.recoverable
t.rememberable
t.trackable
2009-10-19 22:31:33 -04:00
end
t.timestamps
end
2009-10-10 08:32:51 -04:00
end
end
Webrat.configure do |config|
config.mode = :rails
config.open_error_files = false
end
class ActiveSupport::TestCase
self.use_transactional_fixtures = true
self.use_instantiated_fixtures = false
end