Revert changes.
This commit is contained in:
parent
d5ab29474f
commit
5b98be93e1
2 changed files with 42 additions and 46 deletions
|
@ -3,27 +3,25 @@ require File.expand_path('../../config/environment', __FILE__)
|
||||||
require 'rails/test_help'
|
require 'rails/test_help'
|
||||||
require 'cache'
|
require 'cache'
|
||||||
|
|
||||||
module ActiveSupport
|
class ActiveSupport::TestCase
|
||||||
class TestCase
|
# disable transactions
|
||||||
# disable transactions
|
#self.use_transactional_fixtures = false
|
||||||
#self.use_transactional_fixtures = false
|
|
||||||
|
# clear cache
|
||||||
|
Cache.clear
|
||||||
|
|
||||||
|
# load seeds
|
||||||
|
load "#{Rails.root}/db/seeds.rb"
|
||||||
|
|
||||||
|
setup do
|
||||||
|
|
||||||
# clear cache
|
# clear cache
|
||||||
Cache.clear
|
Cache.clear
|
||||||
|
|
||||||
# load seeds
|
# set current user
|
||||||
load "#{Rails.root}/db/seeds.rb"
|
puts 'reset UserInfo.current_user_id'
|
||||||
|
UserInfo.current_user_id = nil
|
||||||
setup do
|
|
||||||
|
|
||||||
# clear cache
|
|
||||||
Cache.clear
|
|
||||||
|
|
||||||
# set current user
|
|
||||||
puts 'reset UserInfo.current_user_id'
|
|
||||||
UserInfo.current_user_id = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
# Add more helper methods to be used by all tests here...
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Add more helper methods to be used by all tests here...
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,38 +5,36 @@ require 'cache'
|
||||||
require 'simplecov'
|
require 'simplecov'
|
||||||
require 'simplecov-rcov'
|
require 'simplecov-rcov'
|
||||||
|
|
||||||
module ActiveSupport
|
class ActiveSupport::TestCase
|
||||||
class TestCase
|
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
||||||
# 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
|
||||||
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
# -- they do not yet inherit this setting
|
||||||
# -- they do not yet inherit this setting
|
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
|
||||||
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
|
SimpleCov.start
|
||||||
SimpleCov.start
|
fixtures :all
|
||||||
fixtures :all
|
|
||||||
|
|
||||||
# disable transactions
|
# disable transactions
|
||||||
self.use_transactional_fixtures = false
|
self.use_transactional_fixtures = false
|
||||||
|
|
||||||
|
# clear cache
|
||||||
|
Cache.clear
|
||||||
|
|
||||||
|
# load seeds
|
||||||
|
load "#{Rails.root}/db/seeds.rb"
|
||||||
|
|
||||||
|
# set system mode to done / to activate
|
||||||
|
Setting.set('system_init_done', true)
|
||||||
|
|
||||||
|
setup do
|
||||||
|
|
||||||
# clear cache
|
# clear cache
|
||||||
Cache.clear
|
Cache.clear
|
||||||
|
|
||||||
# load seeds
|
# set current user
|
||||||
load "#{Rails.root}/db/seeds.rb"
|
puts 'reset UserInfo.current_user_id'
|
||||||
|
UserInfo.current_user_id = nil
|
||||||
# set system mode to done / to activate
|
|
||||||
Setting.set('system_init_done', true)
|
|
||||||
|
|
||||||
setup do
|
|
||||||
|
|
||||||
# clear cache
|
|
||||||
Cache.clear
|
|
||||||
|
|
||||||
# set current user
|
|
||||||
puts 'reset UserInfo.current_user_id'
|
|
||||||
UserInfo.current_user_id = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
# Add more helper methods to be used by all tests here...
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Add more helper methods to be used by all tests here...
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue