|
@@ -5,38 +5,36 @@ require 'cache'
|
|
|
require 'simplecov'
|
|
|
require 'simplecov-rcov'
|
|
|
|
|
|
-module ActiveSupport
|
|
|
- class 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
|
|
|
- SimpleCov.start
|
|
|
- fixtures :all
|
|
|
-
|
|
|
- # disable transactions
|
|
|
- self.use_transactional_fixtures = false
|
|
|
+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
|
|
|
+ SimpleCov.start
|
|
|
+ fixtures :all
|
|
|
|
|
|
- # clear cache
|
|
|
- Cache.clear
|
|
|
+ # disable transactions
|
|
|
+ self.use_transactional_fixtures = false
|
|
|
|
|
|
- # load seeds
|
|
|
- load "#{Rails.root}/db/seeds.rb"
|
|
|
+ # clear cache
|
|
|
+ Cache.clear
|
|
|
|
|
|
- # set system mode to done / to activate
|
|
|
- Setting.set('system_init_done', true)
|
|
|
+ # load seeds
|
|
|
+ load "#{Rails.root}/db/seeds.rb"
|
|
|
|
|
|
- setup do
|
|
|
+ # set system mode to done / to activate
|
|
|
+ Setting.set('system_init_done', true)
|
|
|
|
|
|
- # clear cache
|
|
|
- Cache.clear
|
|
|
+ setup do
|
|
|
|
|
|
- # set current user
|
|
|
- puts 'reset UserInfo.current_user_id'
|
|
|
- UserInfo.current_user_id = nil
|
|
|
- end
|
|
|
+ # clear cache
|
|
|
+ Cache.clear
|
|
|
|
|
|
- # Add more helper methods to be used by all tests here...
|
|
|
+ # 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
|