Flowdock
and_yield(*args, &block) public

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/mocks/message_expectation.rb, line 83
      def and_yield(*args, &block)
        if @args_to_yield_were_cloned
          @args_to_yield.clear
          @args_to_yield_were_cloned = false
        end

        if block
          require 'spec/extensions/instance_exec'
          @eval_context = Object.new
          @eval_context.extend Spec::Matchers::InstanceExec
          yield @eval_context
        end
        @args_to_yield << args
        self
      end
Register or log in to add new notes.