Skip to content

Commit

Permalink
Specifically exclude ActiveSupport::OrderedOptions
Browse files Browse the repository at this point in the history
OrderedOptions strikes again!
  • Loading branch information
jas14 committed Nov 17, 2024
1 parent 2a2805d commit 9ee96d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/super_diff/rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,15 @@ def self.aliased_matcher?(value)
if SuperDiff::RSpec.rspec_version < '3.13.0'
value.is_a?(::RSpec::Matchers::AliasedMatcher)
else # See Github issue #250.
value.respond_to?(:base_matcher)
!ordered_options?(value) && value.respond_to?(:base_matcher)
end
end

def self.ordered_options?(value)
defined?(::ActiveSupport::OrderedOptions) &&
value.is_a?(::ActiveSupport::OrderedOptions)
end

def self.rspec_version
@rspec_version ||=
begin
Expand Down

0 comments on commit 9ee96d5

Please sign in to comment.