rubeno 0.0.13 → 0.0.15
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/base_given.rb +9 -2
- data/lib/base_then.rb +2 -1
- data/lib/base_when.rb +2 -1
- data/lib/rubeno.rb +1 -1
- 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: b87152f22a7f6d6524f84cf09bdbb3b694e34934bfe2c592f54d5a08cd274fe9
|
|
4
|
+
data.tar.gz: 7b43a128aabff272b9c64e243c6e2309aa72cf60c717fe78ab31a3ea30a7072e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0343584b6e498d7fc0c14ca7fb86da59ecb3fea98178acf7453e71783cdff1d7460883c9df7d0b10424a967b7c97ab76372603f2c16a9be293598f6a891ad321'
|
|
7
|
+
data.tar.gz: 0256ef592a012bf33589b7b368ce16b3af182ae5e2629ece42fc70f33e53d7b8a7b85b5fefe848cb4f5b21d7f0a43813a46ac13863c4ecad0b924fefc1f79912
|
data/lib/base_given.rb
CHANGED
|
@@ -3,12 +3,13 @@ module Rubeno
|
|
|
3
3
|
attr_accessor :features, :whens, :thens, :error, :fail, :store, :recommended_fs_path,
|
|
4
4
|
:given_cb, :initial_values, :key, :failed, :artifacts, :status, :fails
|
|
5
5
|
|
|
6
|
-
def initialize(features, whens, thens, given_cb, initial_values)
|
|
6
|
+
def initialize(features, whens, thens, given_cb, initial_values, adapter = nil)
|
|
7
7
|
@features = features
|
|
8
8
|
@whens = whens
|
|
9
9
|
@thens = thens
|
|
10
10
|
@given_cb = given_cb
|
|
11
11
|
@initial_values = initial_values
|
|
12
|
+
@adapter = adapter
|
|
12
13
|
@artifacts = []
|
|
13
14
|
@fails = 0
|
|
14
15
|
end
|
|
@@ -36,7 +37,13 @@ module Rubeno
|
|
|
36
37
|
end
|
|
37
38
|
|
|
38
39
|
def given_that(subject, test_resource_configuration, artifactory, given_cb, initial_values, pm)
|
|
39
|
-
|
|
40
|
+
# Use the adapter's before_each method if available
|
|
41
|
+
if @adapter
|
|
42
|
+
@adapter.before_each(subject, given_cb, test_resource_configuration, initial_values, pm)
|
|
43
|
+
else
|
|
44
|
+
# Fallback to just returning the subject
|
|
45
|
+
subject
|
|
46
|
+
end
|
|
40
47
|
end
|
|
41
48
|
|
|
42
49
|
def after_each(store, key, artifactory, pm)
|
data/lib/base_then.rb
CHANGED
data/lib/base_when.rb
CHANGED
data/lib/rubeno.rb
CHANGED
|
@@ -99,7 +99,7 @@ module Rubeno
|
|
|
99
99
|
# Create classy givens
|
|
100
100
|
test_implementation.givens.each do |key, given_cb|
|
|
101
101
|
@given_overrides[key] = ->(features, whens, thens, initial_values = nil) do
|
|
102
|
-
BaseGiven.new(features, whens, thens, given_cb, initial_values)
|
|
102
|
+
BaseGiven.new(features, whens, thens, given_cb, initial_values, @test_adapter)
|
|
103
103
|
end
|
|
104
104
|
end
|
|
105
105
|
|