debian-mirror-gitlab/doorkeeper/spec/support/helpers/config_helper.rb
2020-01-04 02:51:38 +05:30

9 lines
275 B
Ruby

module ConfigHelper
def config_is_set(setting, value = nil, &block)
setting_ivar = "@#{setting}"
value = block_given? ? block : value
Doorkeeper.configuration.instance_variable_set(setting_ivar, value)
end
end
RSpec.configuration.send :include, ConfigHelper