Commit e5f02b4c authored by Bob Van Landuyt's avatar Bob Van Landuyt

Add a EE::LicenseHelpers to easily enable/disable features

parent 7b4b22a8
......@@ -59,6 +59,7 @@ RSpec.configure do |config|
config.include ApiHelpers, :api
config.include Rails.application.routes.url_helpers, type: :routing
config.include MigrationsHelpers, :migration
config.include EE::LicenseHelpers
config.include Rails.application.routes.url_helpers, type: :routing
config.infer_spec_type_from_file_location!
......
module EE
module LicenseHelpers
def stub_feature(feature, enabled = true)
allow(License).to receive(:feature_available?).and_call_original
allow(License).to receive(:feature_available?).with(feature) { enabled }
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment