yggdrasil-engine 0.0.5.beta.14-x86_64-linux → 0.0.5.beta.16-x86_64-linux

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: 99ce88853cac0e23c9d339387ef3d980beff95ee1b1fb2c61bf5de07d34c82f5
4
- data.tar.gz: f46d8fae7e4dea2bfa2b58d23fe3dd0836235ad74ffe63699b0eb86bfc1e46cb
3
+ metadata.gz: f87de1865857e3f8028698540e1bc7261315e07123ffc951a28d4e4b4b9fb982
4
+ data.tar.gz: e599047e76d17ad6dda136f6d8e81b438e238bf544efc2d88872253bf56187b6
5
5
  SHA512:
6
- metadata.gz: 626e7f0156e31ac56bdfc9bbab2878a9b4337a00673f9462651cc33f63dfd2c6cb76a0ec755097afd56003199a95ed3ea5bfa1a4395a460c3977aa49dacfdcf9
7
- data.tar.gz: a294af1b582e688836126cce37b37d79ce943aedb942321047837bd6684e92a2d1b6e1a7161d61f10aeccb34997e22ab0b35dacadf215113703edd8347203942
6
+ metadata.gz: bc8e2e5d62af2c3c77e4e225f848406e6687a82fec5af9c4f6d2a7985472106c1a70a75aede275193e78b7d606f10cbaa1bd1facdf29abf0452755fccd493a2e
7
+ data.tar.gz: 81b0fb685f5ea452a6123fabfb5e01bfc03be3546569c351d4e32b4b5b7cc80b997df6d6f750bfd24cbbff78604bc002087bc715eed89519fa250ce7179a431d
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: x86_64-linux
6
6
  authors:
7
7
  - Unleash