Class: Capybara::RSpecMatchers::Matcher

Inherits:
Object
  • Object
show all
Includes:
Compound
Defined in:
lib/capybara/rspec/matchers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Compound

#and, #and_then, #or

Instance Attribute Details

#failure_messageObject (readonly)

Returns the value of attribute failure_message



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

def failure_message
  @failure_message
end

#failure_message_when_negatedObject (readonly)

Returns the value of attribute failure_message_when_negated



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

def failure_message_when_negated
  @failure_message_when_negated
end

Instance Method Details

#wrap(actual) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/capybara/rspec/matchers.rb', line 13

def wrap(actual)
  @context_el = if actual.respond_to?("has_selector?")
    actual
  else
    Capybara.string(actual.to_s)
  end
end