yggdrasil-engine 0.0.5.beta.14-x86_64-darwin → 0.0.5.beta.15-x86_64-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libyggdrasilffi_x86_64.dylib +0 -0
- data/spec/yggdrasil_engine_spec.rb +13 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bddcf75dfcebbb3c91959799c20cb03de8ca750f56dce61277732021b0de0f9
|
4
|
+
data.tar.gz: 8079ae90de8c5594130b3f7bfe4f6a98c4cbb3e482635871268fc6316797565f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41be1d8283162f0e4b493c45e7c3c93b2423b4789196a014a97f29e0bacbdea65c23e49839ceafcf0921f253c2ca03225a06f33658ba91e197b2ba68e070d1a6
|
7
|
+
data.tar.gz: fa98a0eb0e2acace2f24d1619d276b92314b787c136dd8b557898036b9fb0732517024fa59315dd9af2d1f80712d1bdd94ece4ac412a9b8ff673461ba10b0b93
|
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) {
|
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])
|