class Capybara::RSpecMatchers::Matchers::Base

def initialize(*args, **kw_args, &filter_block)

def initialize(*args, **kw_args, &filter_block)
  @args = args.dup
  @kw_args = kw_args || {}
  @filter_block = filter_block
end

def session_options

def session_options
  @context_el ||= nil
  if @context_el.respond_to? :session_options
    @context_el.session_options
  elsif @context_el.respond_to? :current_scope
    @context_el.current_scope.session_options
  else
    Capybara.session_options
  end
end

def session_query_args

def session_query_args
  # if @args.last.is_a? Hash
  #   @args.last[:session_options] = session_options
  # else
  #   @args.push(session_options: session_options)
  # end
  @args
end

def session_query_options

def session_query_options
  @kw_args[:session_options] = session_options
  @kw_args
end