sus 0.15.3 → 0.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/sus/it_behaves_like.rb +5 -5
- data/lib/sus/version.rb +1 -1
- data/lib/sus/with.rb +2 -0
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f36ad4203b1471b0dfa6a95fd4407978f5bfab703c09d14d2ee481d519296b46
|
4
|
+
data.tar.gz: 539e6eb3ef50f12d6159c271a63130e696c3f48f914e1b74e7671a90cf90f726
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dddf727776b219c29970aea30f177903bd52f82497a552dd55ff4821be51b5722aade3e081b3eb0d878ab033385ef375aee222afbf500b07a109b2bc8438f85f
|
7
|
+
data.tar.gz: 9dd5df66341eaac3877777af106cd2262720991a3ec742b7859934790255440334b961bce01a3b28306e45b7c4db33d56f56cc5bdf052143f4109a4854f3ba8e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/sus/it_behaves_like.rb
CHANGED
@@ -11,7 +11,7 @@ module Sus
|
|
11
11
|
|
12
12
|
attr_accessor :shared
|
13
13
|
|
14
|
-
def self.build(parent, shared, unique: false, &block)
|
14
|
+
def self.build(parent, shared, arguments = nil, unique: false, &block)
|
15
15
|
base = Class.new(parent)
|
16
16
|
base.singleton_class.prepend(ItBehavesLike)
|
17
17
|
base.children = Hash.new
|
@@ -20,10 +20,10 @@ module Sus
|
|
20
20
|
|
21
21
|
# User provided block is evaluated first, so that it can provide default behaviour for the shared context:
|
22
22
|
if block_given?
|
23
|
-
base.class_exec(&block)
|
23
|
+
base.class_exec(*arguments, &block)
|
24
24
|
end
|
25
25
|
|
26
|
-
base.class_exec(&shared.block)
|
26
|
+
base.class_exec(*arguments, &shared.block)
|
27
27
|
return base
|
28
28
|
end
|
29
29
|
|
@@ -34,8 +34,8 @@ module Sus
|
|
34
34
|
end
|
35
35
|
|
36
36
|
module Context
|
37
|
-
def it_behaves_like(shared, **options, &block)
|
38
|
-
add ItBehavesLike.build(self, shared, **options, &block)
|
37
|
+
def it_behaves_like(shared, *arguments, **options, &block)
|
38
|
+
add ItBehavesLike.build(self, shared, arguments, **options, &block)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
data/lib/sus/version.rb
CHANGED
data/lib/sus/with.rb
CHANGED
@@ -21,6 +21,8 @@ module Sus
|
|
21
21
|
base.identity = Identity.nested(parent.identity, base.description, unique: unique)
|
22
22
|
base.variables = variables
|
23
23
|
|
24
|
+
base.define_method(:description, ->{subject})
|
25
|
+
|
24
26
|
variables.each do |key, value|
|
25
27
|
base.define_method(key, ->{value})
|
26
28
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -38,7 +38,7 @@ cert_chain:
|
|
38
38
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
39
39
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
40
40
|
-----END CERTIFICATE-----
|
41
|
-
date: 2023-01-
|
41
|
+
date: 2023-01-03 00:00:00.000000000 Z
|
42
42
|
dependencies:
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: bake-test
|
metadata.gz.sig
CHANGED
Binary file
|