rubeno 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubeno.rb +20 -11
- 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: 381193b77499b6d76a5fbc4b8961903a5f5f6165acabff0d14d4ac90f5dd592e
|
|
4
|
+
data.tar.gz: d9c769082f34378bb7c383b81e8825b59718992a3fe9eeeda3716cd199fa48b6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9db60ef99dd7f9b8e5d3b6df922a5e8eaab58020fe49f0bf721382be2a55b6043de1a567e22ed0fa8890b6727e060662685bb72e1244a6bcd73665d91d77684
|
|
7
|
+
data.tar.gz: 9dd4c1fdfd7ce1674b8d9104f12eacfe3b9fdc74fb62f2a64a9ada2eaf27c91bca0a2a3dde3aa72b12d36ed3cd2b20a80eb8c6003a97295bec5159878e063a8b
|
data/lib/rubeno.rb
CHANGED
|
@@ -86,6 +86,16 @@ module Rubeno
|
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
def initialize_classy_implementations(test_implementation)
|
|
89
|
+
# Create classy suites
|
|
90
|
+
test_implementation.suites.each do |key, suite_data|
|
|
91
|
+
@suites_overrides[key] = ->(description, givens_dict) do
|
|
92
|
+
{
|
|
93
|
+
'name' => description,
|
|
94
|
+
'givens' => givens_dict
|
|
95
|
+
}
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
89
99
|
# Create classy givens
|
|
90
100
|
test_implementation.givens.each do |key, given_cb|
|
|
91
101
|
@given_overrides[key] = ->(features, whens, thens, initial_values = nil) do
|
|
@@ -317,18 +327,17 @@ module Rubeno
|
|
|
317
327
|
|
|
318
328
|
# Create a minimal test specification
|
|
319
329
|
minimal_specification = ->(suites, givens, whens, thens) do
|
|
330
|
+
# The wrappers are objects with methods, not hashes
|
|
331
|
+
# So we need to use them correctly
|
|
320
332
|
[
|
|
321
|
-
{
|
|
322
|
-
'
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
)
|
|
330
|
-
}
|
|
331
|
-
}
|
|
333
|
+
suites.Default('Minimal Test Suite', {
|
|
334
|
+
'test1' => givens.Default(
|
|
335
|
+
['minimal test'],
|
|
336
|
+
[],
|
|
337
|
+
[thens.alwaysTrue()],
|
|
338
|
+
nil
|
|
339
|
+
)
|
|
340
|
+
})
|
|
332
341
|
]
|
|
333
342
|
end
|
|
334
343
|
|