rspec-sleeping_king_studios 2.8.0.rc.0 → 2.8.1

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: f0fdf0b5b82bec68224de25df61b57af9d3910c48b30676fd96dafc0862ed5c3
4
- data.tar.gz: 96e93e8c3438a94ab2f549cb5487ff6f3f1d3a72f8d935973eab796126eb5aa1
3
+ metadata.gz: dd26d7230b6ba21fe8db04f56e853295255bc89d7262124421f22f3cf66cb061
4
+ data.tar.gz: f67b6b6ddd2230663f0b8bcc993418a73d07175916a3fcabe1c152853f0f5a4f
5
5
  SHA512:
6
- metadata.gz: f2d2c014fccc9f46abf5a1a45d14571b46e33f56edc6c3d7bb23326b8da15624ff02a24383f9da135d38a6c15fd39a171da5037c81d5d63dabeabadc68736699
7
- data.tar.gz: b972588c34e3dbf36778330e3006e432c62c000823686186b1004a9b50a3b2ee4193b6d0f6d932f59a8daeb5eef7218bc5a45db4813b411d88b1a803842a6174
6
+ metadata.gz: dc9403a7440e73895753e59ab57b1f595d5ddd5e47c628a61fb56f12980bd0238572449544c82acda3e6260e8a4cf95e20fa472e7a873006c2ab519859faa29a
7
+ data.tar.gz: 2a525ea9556c622bdad0631559585c562d83e223a8b987236cb7a0a2a22bc055fd1ef65375e5860425fc2d3b543e31a0ae7eb09c4605e31907974e5a741d568e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.8.1
4
+
5
+ ### Matchers
6
+
7
+ Added `RSpec::Matchers::Composable` support to all matchers.
8
+
9
+ - Adds the `#and`, `#or` methods for chaining matchers.
10
+ - Adds support for matching using the `#===` method, including in nested data structure comparisons such as the built-in `#match` matcher.
11
+
3
12
  ## 2.8.0
4
13
 
5
14
  Updated minimum `Hashdiff` version to `~> 1.1`.
@@ -10,6 +10,7 @@ module RSpec::SleepingKingStudios::Matchers::ActiveModel
10
10
  #
11
11
  # @since 1.0.0
12
12
  class HaveErrorsMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
13
+ include RSpec::Matchers::Composable
13
14
  include RSpec::SleepingKingStudios::Matchers::ActiveModel::HaveErrors
14
15
 
15
16
  def initialize
@@ -53,7 +53,7 @@ module RSpec::SleepingKingStudios::Matchers::BuiltIn
53
53
  # @api private
54
54
  #
55
55
  # @return [Boolean]
56
- def does_not_match?(actual)
56
+ def does_not_match?(actual) # rubocop:disable Naming/PredicateName
57
57
  @actual = actual
58
58
 
59
59
  perform_match(actual, &:!)
@@ -9,6 +9,8 @@ module RSpec::SleepingKingStudios::Matchers::Core
9
9
  #
10
10
  # @since 2.2.0
11
11
  class AliasMethodMatcher < RSpec::SleepingKingStudios::Matchers::Core::HaveAliasedMethodMatcher
12
+ include RSpec::Matchers::Composable
13
+
12
14
  # (see BaseMatcher#matches?)
13
15
  def matches?(actual)
14
16
  SleepingKingStudios::Tools::CoreTools.deprecate(
@@ -8,6 +8,8 @@ module RSpec::SleepingKingStudios::Matchers::Core
8
8
  #
9
9
  # @since 2.5.0
10
10
  class BeAUuidMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
11
+ include RSpec::Matchers::Composable
12
+
11
13
  # (see BaseMatcher#description)
12
14
  def description
13
15
  'be a UUID'
@@ -8,6 +8,8 @@ module RSpec::SleepingKingStudios::Matchers::Core
8
8
  #
9
9
  # @since 1.0.0
10
10
  class BeBooleanMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
11
+ include RSpec::Matchers::Composable
12
+
11
13
  # (see BaseMatcher#description)
12
14
  def description
13
15
  'be true or false'
@@ -10,6 +10,7 @@ module RSpec::SleepingKingStudios::Matchers::Core
10
10
  #
11
11
  # @since 1.0.0
12
12
  class ConstructMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
13
+ include RSpec::Matchers::Composable
13
14
  include RSpec::SleepingKingStudios::Matchers::Shared::MatchParameters
14
15
 
15
16
  # (see BaseMatcher#description)
@@ -10,6 +10,8 @@ module RSpec::SleepingKingStudios::Matchers::Core
10
10
  #
11
11
  # @since 2.5.0
12
12
  class DeepMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher # rubocop:disable Metrics/ClassLength
13
+ include RSpec::Matchers::Composable
14
+
13
15
  # @param [Object] expected the expected object.
14
16
  def initialize(expected)
15
17
  super()
@@ -30,7 +32,7 @@ module RSpec::SleepingKingStudios::Matchers::Core
30
32
  # expectation, otherwise true.
31
33
  #
32
34
  # @see #matches?
33
- def does_not_match?(actual) # rubocop:disable Metrics/MethodLength
35
+ def does_not_match?(actual) # rubocop:disable Metrics/MethodLength, Naming/PredicateName
34
36
  super
35
37
 
36
38
  if matcher?(@expected)
@@ -10,6 +10,7 @@ module RSpec::SleepingKingStudios::Matchers::Core
10
10
  #
11
11
  # @since 2.2.0
12
12
  class DelegateMethodMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
13
+ include RSpec::Matchers::Composable
13
14
  include RSpec::Mocks::ExampleMethods
14
15
 
15
16
  # @api private
@@ -11,6 +11,8 @@ module RSpec::SleepingKingStudios::Matchers::Core
11
11
  #
12
12
  # @note Prior to 2.7.0, this was named AliasMethodMatcher.
13
13
  class HaveAliasedMethodMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
14
+ include RSpec::Matchers::Composable
15
+
14
16
  # @param [String, Symbol] original_name The name of the method that is
15
17
  # expected to have an alias.
16
18
  def initialize(original_name)
@@ -12,6 +12,8 @@ module RSpec::SleepingKingStudios::Matchers::Core
12
12
  #
13
13
  # @since 2.4.0
14
14
  class HaveChangedMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
15
+ include RSpec::Matchers::Composable
16
+
15
17
  def initialize
16
18
  super
17
19
 
@@ -11,6 +11,8 @@ module RSpec::SleepingKingStudios::Matchers::Core
11
11
  #
12
12
  # @since 2.2.0
13
13
  class HaveConstantMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
14
+ include RSpec::Matchers::Composable
15
+
14
16
  # @param [String, Symbol] expected The name of the constant to check for on
15
17
  # the actual object.
16
18
  def initialize expected
@@ -11,6 +11,7 @@ module RSpec::SleepingKingStudios::Matchers::Core
11
11
  #
12
12
  # @since 2.2.0
13
13
  class HavePredicateMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
14
+ include RSpec::Matchers::Composable
14
15
  include RSpec::SleepingKingStudios::Matchers::Shared::MatchProperty
15
16
 
16
17
  # Generates a description of the matcher expectation.
@@ -11,6 +11,7 @@ module RSpec::SleepingKingStudios::Matchers::Core
11
11
  #
12
12
  # @since 1.0.0
13
13
  class HavePropertyMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
14
+ include RSpec::Matchers::Composable
14
15
  include RSpec::SleepingKingStudios::Matchers::Shared::MatchProperty
15
16
 
16
17
  # @param [String, Symbol] expected The property to check for on the actual
@@ -10,6 +10,7 @@ module RSpec::SleepingKingStudios::Matchers::Core
10
10
  #
11
11
  # @since 1.0.0
12
12
  class HaveReaderMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
13
+ include RSpec::Matchers::Composable
13
14
  include RSpec::SleepingKingStudios::Matchers::Shared::MatchProperty
14
15
 
15
16
  # @param [String, Symbol] expected The property to check for on the actual
@@ -10,6 +10,7 @@ module RSpec::SleepingKingStudios::Matchers::Core
10
10
  #
11
11
  # @since 1.0.0
12
12
  class HaveWriterMatcher < RSpec::SleepingKingStudios::Matchers::BaseMatcher
13
+ include RSpec::Matchers::Composable
13
14
  include RSpec::SleepingKingStudios::Matchers::Shared::MatchProperty
14
15
 
15
16
  # @param [String, Symbol] expected the property to check for on the actual
@@ -13,11 +13,11 @@ module RSpec
13
13
  # Minor version.
14
14
  MINOR = 8
15
15
  # Patch version.
16
- PATCH = 0
16
+ PATCH = 1
17
17
  # Prerelease version.
18
- PRERELEASE = :rc
18
+ PRERELEASE = nil
19
19
  # Build metadata.
20
- BUILD = 0
20
+ BUILD = nil
21
21
 
22
22
  class << self
23
23
  # Generates the gem version string from the Version constants.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-sleeping_king_studios
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0.rc.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob "Merlin" Smith
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-17 00:00:00.000000000 Z
10
+ date: 2025-04-27 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: hashdiff
@@ -41,22 +41,16 @@ dependencies:
41
41
  name: sleeping_king_studios-tools
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 1.2.0.alpha
47
- - - "<"
44
+ - - "~>"
48
45
  - !ruby/object:Gem::Version
49
- version: '2'
46
+ version: '1.2'
50
47
  type: :runtime
51
48
  prerelease: false
52
49
  version_requirements: !ruby/object:Gem::Requirement
53
50
  requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: 1.2.0.alpha
57
- - - "<"
51
+ - - "~>"
58
52
  - !ruby/object:Gem::Version
59
- version: '2'
53
+ version: '1.2'
60
54
  description: |2
61
55
  A collection of RSpec patches and custom matchers. The features can be
62
56
  included individually or by category. For more information, check out the