123456789_123456789_123456789_123456789_123456789_

Class: Capybara::RSpecMatchers::Matchers::Base

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Instance Chain:
self, Compound, RSpec::Matchers::Composable
Inherits: Object
Defined in: lib/capybara/rspec/matchers/base.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(*args, **kw_args, &filter_block) ⇒ Base

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 15

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

Instance Attribute Details

#failure_message (readonly)

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 13

attr_reader :failure_message, :failure_message_when_negated

#failure_message_when_negated (readonly)

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 13

attr_reader :failure_message, :failure_message_when_negated

Instance Method Details

#session_options (private)

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 37

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

#session_query_args (private)

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 23

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

#session_query_options (private)

[ GitHub ]

  
# File 'lib/capybara/rspec/matchers/base.rb', line 32

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