debian-mirror-gitlab/doorkeeper/spec/support/helpers/config_helper.rb

10 lines
275 B
Ruby
Raw Normal View History

2020-01-04 02:51:38 +05:30
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