Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/feature/definition_spec.rb')
-rw-r--r--spec/lib/feature/definition_spec.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/spec/lib/feature/definition_spec.rb b/spec/lib/feature/definition_spec.rb
index 3d11ad4c0d8..595725d357c 100644
--- a/spec/lib/feature/definition_spec.rb
+++ b/spec/lib/feature/definition_spec.rb
@@ -25,6 +25,9 @@ RSpec.describe Feature::Definition do
using RSpec::Parameterized::TableSyntax
where(:param, :value, :result) do
+ :name | 'colon:separated' | /Feature flag 'colon:separated' is invalid/
+ :name | 'space separated' | /Feature flag 'space separated' is invalid/
+ :name | 'ALL_CAPS' | /Feature flag 'ALL_CAPS' is invalid/
:name | nil | /Feature flag is missing name/
:path | nil | /Feature flag 'feature_flag' is missing path/
:type | nil | /Feature flag 'feature_flag' is missing type/
@@ -111,6 +114,11 @@ RSpec.describe Feature::Definition do
subject { described_class.send(:load_all!) }
+ after do
+ FileUtils.rm_rf(store1)
+ FileUtils.rm_rf(store2)
+ end
+
it "when there's no feature flags a list of definitions is empty" do
is_expected.to be_empty
end
@@ -136,11 +144,6 @@ RSpec.describe Feature::Definition do
.to raise_error(/Feature flag is missing name/)
end
- after do
- FileUtils.rm_rf(store1)
- FileUtils.rm_rf(store2)
- end
-
def write_feature_flag(store, path, content)
path = File.join(store, path)
dir = File.dirname(path)