sus 0.15.3 → 0.17.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca4fbc032d65ca7f24a8c551f9202722aa81d90ec15cf40e73dd05ecbe9a5bf8
4
- data.tar.gz: 937cf3c24714895dc13d81750399cbff7adddc4969eca4e096b2927cbd6e08bb
3
+ metadata.gz: 6a328443e5ed5bf8e59b97bfc991017fe0c46a112887b6cd179075b233675658
4
+ data.tar.gz: ca7ace995a25c5e034ad27fc14a0bf1f7659a5078bdc9f9db5b904bd9bbff266
5
5
  SHA512:
6
- metadata.gz: 0c9864a40e6fba7866856f86616f93e7b87579e07d2759a9c19c8ef3f6a31971506a0861c0f179c688c32ad5d5c7f28c8fe1f9b33f30c3dd576ef4622fd306a0
7
- data.tar.gz: f8fc4848f66ef8ea3d52ffd3d8d4918e14bc464f5e30ee8fba66f1bfcf584c2ce1eb8e37679f96b93bd15600551f142f23f38cccff23df9ac9bceb4ac20e5134
6
+ metadata.gz: 16d7f6a4d9e5840e7b0cc4b8acc9a5656b70876c5cfc2e378eb4819e26954a07aa774405b51cf863160ac17f7d19a0a2e6984b2d0fee975c254470255b9686f6
7
+ data.tar.gz: 35965ea359a3f68d524fb17fe0fd69623f43c536bf8e70c4383474d11987bca4d53ac85c39a678494330603bdaa10be1ad94ba34eaae460172a760a0881b74d3
checksums.yaml.gz.sig CHANGED
Binary file
@@ -7,8 +7,8 @@ require_relative 'context'
7
7
 
8
8
  module Sus
9
9
  module Context
10
- def include_context(shared)
11
- self.class_exec(&shared.block)
10
+ def include_context(shared, *arguments, **options)
11
+ self.class_exec(*arguments, **options, &shared.block)
12
12
  end
13
13
  end
14
14
  end
@@ -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
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2021-2022, by Samuel Williams.
5
5
 
6
6
  module Sus
7
- VERSION = "0.15.3"
7
+ VERSION = "0.17.0"
8
8
  end
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.15.3
4
+ version: 0.17.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-02 00:00:00.000000000 Z
41
+ date: 2023-02-18 00:00:00.000000000 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: bake-test
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  - !ruby/object:Gem::Version
156
156
  version: '0'
157
157
  requirements: []
158
- rubygems_version: 3.4.1
158
+ rubygems_version: 3.4.6
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: A fast and scalable test runner.
metadata.gz.sig CHANGED
Binary file