def and_return(value = nil)
      @do_not_check_plan_arity = false

      if block_given?
        if value.is_a?(Hash) && value.has_key?(:force)
          @do_not_check_plan_arity = !!value[:force]
        elsif !value.nil?
          raise ArgumentError, "value and block conflict. Choose one"
        end

        @plan = Proc.new
        check_for_too_many_arguments!(@plan)
      else
        @plan = Proc.new { value }
      end
      self
    end
def and_return(value = nil)
      @do_not_check_plan_arity = false

      if block_given?
        if value.is_a?(Hash) && value.has_key?(:force)
          @do_not_check_plan_arity = !!value[:force]
        elsif !value.nil?
          raise ArgumentError, "value and block conflict. Choose one"
        end

        @plan = Proc.new
        check_for_too_many_arguments!(@plan)
      else
        @plan = Proc.new { value }
      end
      self
    end
@overload and_return(value)
 @overload and_return(&block)

 Tells the spy to return a value when the method is called.

 If a block is sent it will execute the block when the method is called.
 The airty of the block will be checked against the original method when
 you first call `and_return` and when the method is called.

 If you want to disable the arity checking just pass `{force: true}` to the
 value

 @example
   spy.and_return(true)
   spy.and_return { true }
   spy.and_return(force: true) { |invalid_arity| true }

 @return [self]