diff --git a/lib/capybara/rspec/matcher_proxies.rb b/lib/capybara/rspec/matcher_proxies.rb index e576a357b..2f2e08080 100644 --- a/lib/capybara/rspec/matcher_proxies.rb +++ b/lib/capybara/rspec/matcher_proxies.rb @@ -52,6 +52,11 @@ def included(base) base.include(::Capybara::RSpecMatcherProxies) if defined?(::RSpec::Matchers) && base.include?(::RSpec::Matchers) super end + + def extended(base) + base.extend(::Capybara::RSpecMatcherProxies) if defined?(::RSpec::Matchers) && base.is_a?(::RSpec::Matchers) + super + end end def self.prepended(base)