yggdrasil-engine 0.0.5.beta.14-x64-mingw32 → 0.0.5.beta.16-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: 4473da47e0ad0235c76e7df96ac1532cca91ba3e6465ad6157f7aabb9ba25e91
4
+ data.tar.gz: 498d936d8c16fbe0649533f24f7f33d14c9b236a02a7a8c267f4c0302679fed3
5
5
  SHA512:
6
- metadata.gz: f8262e009aee51f8f6f730221b6c7e81460ac23c698b82c9f6edffee19b7fad8f3b8db6262f4462b537643cf30b1ceb4b796eec22b8ba9e5e71478193346a8d6
7
- data.tar.gz: aacaf41a8a9bca4f2f752e0e5e65284f533d0768b68bad63c0a95279b8b86ab11aa9fbcb98a5cb264994c985ef411c217a65083a62b49a3551d93b23982b9784
6
+ metadata.gz: edd99b96e3c666f2236db4ceaebb155f6bbdcdee2ca1df418204844784ff4f161843daad44c306549a07ea831ae92c8878708db9e1e1c716eec8c7eb08720bb5
7
+ data.tar.gz: bb457ccff3b46756825373cd5f117369d0dd421f48320115cb7bc2664003a7201eb5bc92e3613f2dfce88c042d1c960d7bf3a6eed716aa40015204793efde02a
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: x64-mingw32
6
6
  authors:
7
7
  - Unleash