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 May 9, 2024
1 parent 8629d6c commit 6c38951
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 @@ -82,10 +82,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 6c38951

Please sign in to comment.