X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/195b23ed7fd0c6261d0a945a9f0e541d78a0648e..b3f3c28f67519f23a4b734b2a75eaf4f32c0049f:/apps/workbench/test/test_helper.rb diff --git a/apps/workbench/test/test_helper.rb b/apps/workbench/test/test_helper.rb index 72469bc059..5253676578 100644 --- a/apps/workbench/test/test_helper.rb +++ b/apps/workbench/test/test_helper.rb @@ -22,6 +22,7 @@ end require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' +require 'mocha/mini_test' class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in @@ -35,10 +36,15 @@ class ActiveSupport::TestCase Thread.current[:arvados_api_token] = auth['api_token'] end - def teardown + teardown do Thread.current[:arvados_api_token] = nil Thread.current[:reader_tokens] = nil - super + # Restore configuration settings changed during tests + $application_config.each do |k,v| + if k.match /^[^.]*$/ + Rails.configuration.send (k + '='), v + end + end end end