Sha256: cdad1737ecae7e5f2bf4268b7ad6138d76babadd5e9183bdd132ddd41e38a701
Contents?: true
Size: 852 Bytes
Versions: 5331
Compression:
Stored size: 852 Bytes
Contents
module RSpec module Matchers # Provides the necessary plumbing to wrap a matcher with a decorator. # @private class MatcherDelegator include Composable attr_reader :base_matcher def initialize(base_matcher) @base_matcher = base_matcher end def method_missing(*args, &block) base_matcher.__send__(*args, &block) end if ::RUBY_VERSION.to_f > 1.8 def respond_to_missing?(name, include_all=false) super || base_matcher.respond_to?(name, include_all) end else # :nocov: def respond_to?(name, include_all=false) super || base_matcher.respond_to?(name, include_all) end # :nocov: end def initialize_copy(other) @base_matcher = @base_matcher.clone super end end end end
Version data entries
5,331 entries across 5,245 versions & 119 rubygems