From 11d1efaef622335fe6d45917ce0b50a02e4a24a1 Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 18 Jul 2014 12:22:56 +0200 Subject: Allow fetching configs if anonymous EIP access is allowed --- features/step_definitions/config_steps.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'features/step_definitions/config_steps.rb') diff --git a/features/step_definitions/config_steps.rb b/features/step_definitions/config_steps.rb index 50ae829..70ff1aa 100644 --- a/features/step_definitions/config_steps.rb +++ b/features/step_definitions/config_steps.rb @@ -4,3 +4,13 @@ Given /the provider config is:$/ do |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 -- cgit v1.2.3