yggdrasil-engine 0.0.5.beta.14-x64-mingw32 → 0.0.5.beta.15-x64-mingw32

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: 19fa8960ebab13e4eda2abdc2424bc4b63c733dabd53ab1336641fb2a81d33fe
4
- data.tar.gz: 4a5d11efe6c064a56db59b8127e34144e2eb03445390a81b9659e501def54844
3
+ metadata.gz: 6f14309304abdd5afd630bb50e22814a272f33175d5921cfa7a3e263545872e9
4
+ data.tar.gz: 966afa74a7712270e40cdd2885b7ca7cbc76cf9bbd95479bd755ba4c2390593f
5
5
  SHA512:
6
- metadata.gz: f8262e009aee51f8f6f730221b6c7e81460ac23c698b82c9f6edffee19b7fad8f3b8db6262f4462b537643cf30b1ceb4b796eec22b8ba9e5e71478193346a8d6
7
- data.tar.gz: aacaf41a8a9bca4f2f752e0e5e65284f533d0768b68bad63c0a95279b8b86ab11aa9fbcb98a5cb264994c985ef411c217a65083a62b49a3551d93b23982b9784
6
+ metadata.gz: 0a31770ca30a6b19fe4596a5993da500b81c73cb4439adb88c2a39d1720e8ecf937ae9b4584a5d9db81f51a9d5b662f2ea6ccdbad70f9bdd3ed505e07e984a04
7
+ data.tar.gz: 053156af486f08c8e5b77ff7d87fad45d9848be102b49ac56b65d78baca0e40a6e823bb921f38c61cb1b08d1528b2e75a476eb04212aeaea920c18a78245c964
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: x64-mingw32
6
6
  authors:
7
7
  - Unleash