rspec-sleeping_king_studios 2.8.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: 25aa9386c75aee4f144e0418216f2dccb9b10199f8ae3d1fbd41d2d33b3c2f4a
4
- data.tar.gz: 372fd50f8316d763588104cec4963f880c244d12b45e5fa6314f3728238e4992
3
+ metadata.gz: dd26d7230b6ba21fe8db04f56e853295255bc89d7262124421f22f3cf66cb061
4
+ data.tar.gz: f67b6b6ddd2230663f0b8bcc993418a73d07175916a3fcabe1c152853f0f5a4f
5
5
  SHA512:
6
- metadata.gz: 172b319ee9e736ed029a446b51f95314ba224867a640a79741d24993d7f2f00daa600ba4c97ef40485a412b615ec27eca7d5f2f466ddf6de06f1f6d26144d58d
7
- data.tar.gz: f3859c184dbeefa1cd3a7ff0c02af54fcbdda20c4281bec6edc45f345f684714fa5f1346087c814d2e642171552133d11561d8522f70d4aa674f2994f561f4b6
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
@@ -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()
@@ -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,7 +13,7 @@ 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
18
  PRERELEASE = nil
19
19
  # Build metadata.
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
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-30 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