sus 0.21.2 → 0.22.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: 9c9d5cda23334b97833ed1a604e83b02e40082a954090b534c40308d6bd311c3
4
- data.tar.gz: 758aff4bbafb00ed7587d281f26a7c0ee8922f5a8e24156c1e5647da7268d6f1
3
+ metadata.gz: 49e0b28d22be1c2142e9868d47de8e0e39447874bb5e17a4a9c513c723656617
4
+ data.tar.gz: 85e6348661715455dcec9ea552e59b788dd7637d79b32126c3e456e68b4d6998
5
5
  SHA512:
6
- metadata.gz: 27c8d2c7e7547f69799e7d078076abc6a629c2e8c7c29d7c37bc40bbcaff207ef253477de12818429f6543db07be95738c39371d7f6b1329179a6eca0b4cc190
7
- data.tar.gz: 5e6746be0bbe69a8698903cb7a95a4ce5e61598b1744bf0b85095c3de6e47a3523855ba8d82f07071f0bfd5fba4463800b510107b4ed9534c8c88f7f629c56b1
6
+ metadata.gz: f079bb5a6e5d3ff4f9f27f25f93675111754fbcc92f95b59209d981a370adbe2008ecb07acd7fb280db0f0d47705ae3254d55791f473e78891552cfebf7ba044
7
+ data.tar.gz: 99dde477c93576abf2ff664a3fd8bc31eda8be9280c6cd79aa6f831d68f4ae004ef9a6815ce6bcd49e718c64d4745a0b040c90b0b67fcb1be7886664823c6769
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/sus/config.rb CHANGED
@@ -78,12 +78,12 @@ module Sus
78
78
  return Dir.glob(DEFAULT_TEST_PATTERN, base: @root)
79
79
  end
80
80
 
81
- def registry
82
- @registry ||= self.load_registry
81
+ def make_registry
82
+ Sus::Registry.new(root: @root)
83
83
  end
84
84
 
85
85
  def load_registry(paths = @paths)
86
- registry = Sus::Registry.new(root: @root)
86
+ registry = make_registry
87
87
 
88
88
  if paths&.any?
89
89
  registry = Sus::Filter.new(registry)
@@ -99,6 +99,10 @@ module Sus
99
99
  return registry
100
100
  end
101
101
 
102
+ def registry
103
+ @registry ||= self.load_registry
104
+ end
105
+
102
106
  def before_tests(assertions, output: self.output)
103
107
  @clock.reset!
104
108
  @clock.start!
data/lib/sus/context.rb CHANGED
@@ -47,7 +47,13 @@ module Sus
47
47
  end
48
48
 
49
49
  def print(output)
50
- output.write("context ", :context, self.description)
50
+ output.write("context", :context, self.description)
51
+ end
52
+
53
+ def full_name
54
+ output = Output::Buffered.new
55
+ print(output)
56
+ return output.string
51
57
  end
52
58
 
53
59
  def call(assertions)
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2023, by Samuel Williams.
5
+
6
+ module Sus
7
+ module Integrations
8
+ end
9
+ end
data/lib/sus/it.rb CHANGED
@@ -28,11 +28,11 @@ module Sus
28
28
  def print(output)
29
29
  self.superclass.print(output)
30
30
 
31
- if description = self.description
32
- output.write(" it ", :it, description, :reset, " ", :identity, self.identity.to_s, :reset)
33
- else
34
- output.write(" and ", :identity, self.identity.to_s, :reset)
35
- end
31
+ output.write(" it ", :it, self.description, :reset, " ", :identity, self.identity.to_s, :reset)
32
+ end
33
+
34
+ def to_s
35
+ "it #{description}"
36
36
  end
37
37
 
38
38
  def call(assertions)
@@ -77,5 +77,17 @@ module Sus
77
77
  skip "Constant #{constant} is not defined in #{target}!"
78
78
  end
79
79
  end
80
+
81
+ def skip_unless_minimum_ruby_version(version)
82
+ unless RUBY_VERSION >= version
83
+ skip "Ruby #{version} is required, but running #{RUBY_VERSION}!"
84
+ end
85
+ end
86
+
87
+ def skip_if_maximum_ruby_version(version)
88
+ if RUBY_VERSION >= version
89
+ skip "Ruby #{version} is not supported, but running #{RUBY_VERSION}!"
90
+ end
91
+ end
80
92
  end
81
93
  end
data/lib/sus/registry.rb CHANGED
@@ -27,7 +27,7 @@ module Sus
27
27
  @base = Sus.base(self, **options)
28
28
  @loaded = {}
29
29
  end
30
-
30
+
31
31
  attr :base
32
32
 
33
33
  def print(output)
data/lib/sus/version.rb CHANGED
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2021-2023, by Samuel Williams.
5
5
 
6
6
  module Sus
7
- VERSION = "0.21.2"
7
+ VERSION = "0.22.0"
8
8
  end
data/lib/sus/with.rb CHANGED
@@ -38,6 +38,7 @@ module Sus
38
38
 
39
39
  def print(output)
40
40
  self.superclass.print(output)
41
+
41
42
  output.write(
42
43
  " with ", :with, self.description, :reset,
43
44
  # " ", :variables, self.variables.inspect
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.21.2
4
+ version: 0.22.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-07-21 00:00:00.000000000 Z
41
+ date: 2023-07-22 00:00:00.000000000 Z
42
42
  dependencies: []
43
43
  description:
44
44
  email:
@@ -74,6 +74,7 @@ files:
74
74
  - lib/sus/have_duration.rb
75
75
  - lib/sus/identity.rb
76
76
  - lib/sus/include_context.rb
77
+ - lib/sus/integrations.rb
77
78
  - lib/sus/it.rb
78
79
  - lib/sus/it_behaves_like.rb
79
80
  - lib/sus/let.rb
metadata.gz.sig CHANGED
Binary file