trabajo-afectivo/test/test_helper.rb

37 lines
864 B
Ruby
Raw Normal View History

2012-04-10 13:31:21 +00:00
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'cache'
2013-01-08 13:56:20 +00:00
require 'simplecov'
require 'simplecov-rcov'
2012-04-10 13:31:21 +00:00
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
# -- they do not yet inherit this setting
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
2012-11-08 20:11:54 +00:00
SimpleCov.start
2012-04-10 13:31:21 +00:00
fixtures :all
# disable transactions
self.use_transactional_fixtures = false
# clear cache
Cache.clear
2012-05-06 20:48:23 +00:00
# load seeds
load "#{Rails.root}/db/seeds.rb"
2012-05-06 20:48:23 +00:00
setup do
# set current user
puts 'reset UserInfo.current_user_id'
UserInfo.current_user_id = nil
end
2012-04-10 13:31:21 +00:00
# Add more helper methods to be used by all tests here...
end
2013-01-08 14:11:06 +00:00
2013-01-08 14:26:08 +00:00