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 +4 -4
- data/lib/libyggdrasilffi_x86_64.dll +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: 6f14309304abdd5afd630bb50e22814a272f33175d5921cfa7a3e263545872e9
|
4
|
+
data.tar.gz: 966afa74a7712270e40cdd2885b7ca7cbc76cf9bbd95479bd755ba4c2390593f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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) {
|
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])
|