class RSpec::Matchers::DSL::Matcher
def for_expected(*expected)
- Api: - private
def for_expected(*expected) @expected = expected dup.instance_eval do instance_variables.map {|ivar| ivar.intern}.each do |ivar| instance_variable_set(ivar, nil) unless (PERSISTENT_INSTANCE_VARIABLES + [:@expected]).include?(ivar) end @messages = {} @deprecated_methods = Set.new @block_method_differentiator = DifferentiateBlockMethodTypes.new(*@expected, &@declarations) making_declared_methods_public do instance_eval_with_args(*@expected, &@declarations) end @define_block_executed = true self end end