ee/spec/support/helpers/ee/license_helpers.rb
# Enable/Disable a feature on the License for a spec.
#
# Example:
#
#   stub_licensed_features(geo: true, deploy_board: false)
#
# This enables `geo` and disables `deploy_board` features for a spec.
# Other features are still enabled/disabled as defined in the license.
Enable/Disable a feature on the License for a spec.
Example.



This enables `geo` and disables `deploy_board` features for a spec.
Other features are still enabled/disabled as defined in the license.
Enable / Disable a feature on the License for a spec . Example . This enables ` geo ` and disables ` deploy_board ` features for a spec . Other features are still enabled / disabled as defined in the license .
def stub_licensed_features(features)
      allow(License).to receive(:feature_available?).and_call_original
      features.each do |feature, enabled|
        allow(License).to receive(:feature_available?).with(feature) { enabled }
      end
    end
def stub_licensed_features ( features ) allow ( License ) . to receive ( :feature_available? ) . and_call_original features . each do | feature , enabled | allow ( License ) . to receive ( :feature_available? ) . with ( feature ) { enabled } end end
Enable/Disable a feature on the License for a spec.
Enable / Disable a feature on the License for a spec .
features
<not_specific>