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
2009-11-15 03:31:13 -02:00

41 lines
1 KiB
Ruby

ENV["RAILS_ENV"] = "test"
require File.join(File.dirname(__FILE__), 'rails_app', 'config', 'environment')
require 'test_help'
require 'webrat'
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
ActionMailer::Base.delivery_method = :test
ActionMailer::Base.perform_deliveries = true
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].each do |table|
create_table table do |t|
t.authenticatable :null => table == :admins
t.string :username if table == :users
if table == :users
t.confirmable
t.recoverable
t.rememberable
end
t.timestamps
end
end
end
Webrat.configure do |config|
config.mode = :rails
end
class ActiveSupport::TestCase
self.use_transactional_fixtures = true
self.use_instantiated_fixtures = false
end