Isolate SITE_CONFIG in tests using minitest-stub-const

This commit is contained in:
Dan Rice 2016-05-22 16:21:00 -04:00
parent 3de582f436
commit 58e2b82315
6 changed files with 130 additions and 96 deletions

View file

@ -0,0 +1,9 @@
require 'minitest/stub_const'
module StubSiteConfigHelper
def stub_site_config
Object.stub_const(:SITE_CONFIG, SITE_CONFIG.clone) do
yield
end
end
end