yggdrasil-engine 0.0.5.beta.14-universal-java-11 → 0.0.5.beta.16-universal-java-11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50087376ed43c6ec29515a97c910de3032306cfce1996e5e666e7c77482d89fe
4
- data.tar.gz: a3e56d65c12dba742c42b3a29229394689ac9b72ba4c7588b05c13a58d4e5612
3
+ metadata.gz: 35b342833c05165944a8545899f2ffd28556fe8dde2c0bbc267e4dc497f80819
4
+ data.tar.gz: 910b80b4ac91e0fd249e856557c4828cc05450f1400028a1cebdfa5f2ba8c5e4
5
5
  SHA512:
6
- metadata.gz: 6831fcd62f7ae1f2e4b6ce27ffdcb07b9b63add57939f21d0b73f4a04439362a17281f762221ec1b0735e546d2d1cc465b06f74d1c471cd7c0e2750cc5832b25
7
- data.tar.gz: 801019b41d848a85d3ae32b90c1695e3d420f6aa06cc2908a6e7a7bb37275b5cd3d25c6490835892f203a65d421b4c9916ed4cb2a8d91a17e14630f197ca206c
6
+ metadata.gz: 7969f65ca078c83c0dd7194cf0209d3de20e9ce16ef390394aaff2ff443bfa62f9794c9304502ac720b3a0e5b2ed5d4a4b844c87d014e33bb195d96247d2235c
7
+ data.tar.gz: 11993ed7c7efe56c076e02ac94e24f7f710f7ba0bf467cd56d2a7dac33991104e8d7abe09ddd31a9f87457c058e54406da2b027704cb219677b05b1a975ae283
Binary file
Binary file
Binary file
Binary file
@@ -5,6 +5,16 @@ require_relative '../lib/yggdrasil_engine'
5
5
  index_file_path = '../client-specification/specifications/index.json'
6
6
  test_suites = JSON.parse(File.read(index_file_path))
7
7
 
8
+ def test_suite_variant(base_variant)
9
+ payload = base_variant[:payload] && base_variant[:payload].transform_keys(&:to_s)
10
+ {
11
+ name: base_variant[:name],
12
+ enabled: base_variant[:enabled],
13
+ feature_enabled: base_variant[:feature_enabled],
14
+ payload: payload,
15
+ }
16
+ end
17
+
8
18
  RSpec.describe YggdrasilEngine do
9
19
  let(:yggdrasil_engine) { YggdrasilEngine.new }
10
20
 
@@ -119,13 +129,14 @@ RSpec.describe 'Client Specification' do
119
129
  describe "Variant Test '#{test[:description]}'" do
120
130
  let(:context) { test[:context] }
121
131
  let(:toggle_name) { test[:toggleName] }
122
- let(:expected_result) { to_variant(test[:expectedResult]) }
132
+ let(:expected_result) { test_suite_variant(test[:expectedResult]) }
123
133
 
124
134
  it 'returns correct result for `get_variant` method' do
125
135
  result = yggdrasil_engine.get_variant(toggle_name, context) || {
126
136
  :name => 'disabled',
127
137
  :payload => nil,
128
- :enabled => false
138
+ :enabled => false,
139
+ :feature_enabled => false
129
140
  }
130
141
 
131
142
  expect(result[:name]).to eq(expected_result[:name])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yggdrasil-engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.beta.14
4
+ version: 0.0.5.beta.16
5
5
  platform: universal-java-11
6
6
  authors:
7
7
  - Unleash