yggdrasil-engine 0.0.5.beta.14-universal-java-17 → 0.0.5.beta.15-universal-java-17

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: 1e42ae605dc0b9c8ebe15974ea00d35fa2367724cf3cb011356ab0e46dd92d77
4
- data.tar.gz: feb76bd62094eff1e26e4d6d24153785ede32ba913770af2d254d3d131831b0c
3
+ metadata.gz: d4f27218fc84d11947000d0f29849ebaa1143c1155defba20cd6acd6744e20f7
4
+ data.tar.gz: e69007d9e7f39d6374f54f17eb2da705648ded2cf8252e98b1702b4d2813a716
5
5
  SHA512:
6
- metadata.gz: 99ed433227ceb6dd6aa36a8d533ab055429bece805de4ab358aac4640664c728f0c874ddcd2206198139954d82e5164a7adff9d2871b8e3fc944e24f006da627
7
- data.tar.gz: 108a11f8f92299c5056d344ca95b8083607c793506df20f4ad27ac2a33ac95e26b257a8be77cf06c391f20edae7dcc47c2f0bd6b7ee219786808f48a2e560825
6
+ metadata.gz: 5946591c02889ce341bf66a84f4da8df98fab231108520983998eafbdd6f601b92a15bfcd38ac9bce3746a87489a55887fe1321ce3e45e1da13ccd106a30e205
7
+ data.tar.gz: 3bcecae211cbf6b8348080c0335d0db086eaa8f1c8df4e3e04e141bc4512043ddee874ddf2669f75e52a1b2685924e8e72ba11c344aaaf9df4aeb657b5307acc
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.15
5
5
  platform: universal-java-17
6
6
  authors:
7
7
  - Unleash