blob: 70ff1aa88564c8fb3cbe29b35a2c0deeca0186c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
Given /the provider config is:$/ do |config|
@tempfile = Tempfile.new('provider.json')
@tempfile.write config
@tempfile.close
StaticConfigController::PROVIDER_JSON = @tempfile.path
end
# use with @config tag so the config changes are reverted after the scenario
Given /^"([^"]*)" is (enabled|disabled|"[^"]") in the config$/ do |key, value|
value = case value
when 'disabled' then false
when 'enabled' then true
else value.gsub('"', '')
end
APP_CONFIG.merge! key => value
end
|