yggdrasil-engine 0.0.5.beta.14-arm64-darwin → 0.0.5.beta.16-arm64-darwin

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: c44750ce7aaceb7f971a1483823f0cc536a70a0aadc3ae9605b9a8c2cb253151
4
- data.tar.gz: 61e0c6df20da0c1494f0b9956d264ff144ddbc1f9aa5d96bd9a3733e988521ce
3
+ metadata.gz: 11866bf4a19bd0778bd7a5dca220c21e7478f3881fae7294634633762459446b
4
+ data.tar.gz: e5c00b75fa8c98a08b5bcd1ff8eda22074658c1214bbbafeef48c221b2c5c9a0
5
5
  SHA512:
6
- metadata.gz: 753d3fa4f7d284811d3f6259c80c0b4501ebb6190ec1806a171306b60cf8628ce900b075a3eb61684620fa412be90cb22fedd1c8d069ef158399e09f66e918dc
7
- data.tar.gz: 2a00c03971552713719148e59f3ead78d071c2f2523abdac3e1c34dcbeb15cf2bfd97cdeea6b2f145f913fa1ca1df4e59f6fc60e22f117ec4fe62a990614b1b3
6
+ metadata.gz: 683b867618c52884bd259bb17005c4db8c8c21ebe755efd4d8f52d294d0fd8cfeee292a9dae86253e09b7f28b5cb3ff957a65aace545c53da338afec8ac0b3bd
7
+ data.tar.gz: e6da8c49353bca5049a41c6b7e2d67ce728caefe2c29389e63be26763ccdb304d7cd1d22fb2b343c74966f847df07d9c51ccfb8d65f5ee587d447e9cebf42557
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: arm64-darwin
6
6
  authors:
7
7
  - Unleash