diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-21 15:16:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-21 15:16:55 +0300 |
commit | 0ad1c3fb54e60b8276542d5a401533f7aff92b00 (patch) | |
tree | a1be4d2665e102cc3f805891904d33923586e5bc /spec/experiments | |
parent | 0976c2c3d9b722acce50120ea4a09d0e83f50d6e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/experiments')
-rw-r--r-- | spec/experiments/application_experiment_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/experiments/application_experiment_spec.rb b/spec/experiments/application_experiment_spec.rb index 70ee4bd3c5a..f3bd9eafbc3 100644 --- a/spec/experiments/application_experiment_spec.rb +++ b/spec/experiments/application_experiment_spec.rb @@ -18,10 +18,13 @@ RSpec.describe ApplicationExperiment, :experiment do allow(application_experiment).to receive(:enabled?).and_return(true) end - it "doesn't raise an exception without a defined control" do - # because we have a default behavior defined + it "registers a default control behavior for anonymous experiments" do + # This default control behavior is not inherited, intentionally, but it + # does provide anonymous experiments with a base control behavior to keep + # them optional there. - expect { experiment('namespaced/stub') { } }.not_to raise_error + expect(experiment(:example)).to register_behavior(:control).with(nil) + expect { experiment(:example) { } }.not_to raise_error end describe "#publish" do |