Skip to content

Commit 6c38951

Browse files
committed
Specifically exclude ActiveSupport::OrderedOptions
OrderedOptions strikes again!
1 parent 8629d6c commit 6c38951

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/super_diff/rspec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,15 @@ def self.aliased_matcher?(value)
8282
if SuperDiff::RSpec.rspec_version < "3.13.0"
8383
value.is_a?(::RSpec::Matchers::AliasedMatcher)
8484
else # See Github issue #250.
85-
value.respond_to?(:base_matcher)
85+
!ordered_options?(value) && value.respond_to?(:base_matcher)
8686
end
8787
end
8888

89+
def self.ordered_options?(value)
90+
defined?(::ActiveSupport::OrderedOptions) &&
91+
value.is_a?(::ActiveSupport::OrderedOptions)
92+
end
93+
8994
def self.rspec_version
9095
@_rspec_version ||=
9196
begin

0 commit comments

Comments
 (0)