yggdrasil-engine 0.0.5.beta.14-universal-java-1.8 → 0.0.5.beta.16-universal-java-1.8

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: 8aebbbd26821d4c35ba674c332c60ea2bfe5135dce60b270ff2c83a944bb475b
4
- data.tar.gz: efee68697a06b5d587532528d5a414b0060ab486687f9c9310d8787daaed0eb1
3
+ metadata.gz: '087333c31230e68d07fd1d28797e9e0f9ebc2634fa523f8f9f6583abf5657782'
4
+ data.tar.gz: 7380f248f4e8206c2d4769a515b82680b888954981b510bc16a1cd7584cc2fc0
5
5
  SHA512:
6
- metadata.gz: 40d3726164281f303d1bc13ff2f4c7743c190e9cb5e88e5023006230038d51444a78a68fe1f0d8728a3f45f757989f047d17c2d6051da4e549d236ddf5116c2f
7
- data.tar.gz: b9125796c1a796aed78ca92cab0b2b5611eb4d7f92c19b26618b45cd27965513bfc5f85ff71a31bce68fe283af3a4c7b18bfeee1fc4d3340c790a583c755fa81
6
+ metadata.gz: fe8c54585a6f81646f7c3514dd36e1b50a752502718898c0c803eec37881be5489b4b42a9da9508b28500c792955b851dc5c7f9d6e05f2d35b0b4acb85cdf9a3
7
+ data.tar.gz: ae6962c817608601e2d838a84252c77618dd06d47b186cb69c76b1b3a577f6f2ba59ff375b724ae7e04bb710bf1ce4766c5757e40b5307d118ae3afa187ba6ec
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.16
5
5
  platform: universal-java-1.8
6
6
  authors:
7
7
  - Unleash