Class: Capybara::RSpecMatchers::HaveTitle
- Inherits:
-
Matcher
- Object
- Matcher
- Capybara::RSpecMatchers::HaveTitle
show all
- Defined in:
- lib/capybara/rspec/matchers.rb
Instance Attribute Summary
Attributes inherited from Matcher
#failure_message, #failure_message_when_negated
Instance Method Summary
collapse
Methods inherited from Matcher
#wrap
Methods included from Compound
#and, #and_then, #or
Constructor Details
#initialize(*args) ⇒ HaveTitle
Returns a new instance of HaveTitle.
162
163
164
165
166
167
|
# File 'lib/capybara/rspec/matchers.rb', line 162
def initialize(*args)
@args = args
@title = args.first
end
|
Instance Method Details
#description ⇒ Object
177
178
179
|
# File 'lib/capybara/rspec/matchers.rb', line 177
def description
"have title #{@title.inspect}"
end
|
#does_not_match?(actual) ⇒ Boolean
173
174
175
|
# File 'lib/capybara/rspec/matchers.rb', line 173
def does_not_match?(actual)
wrap_does_not_match?(actual) { |el| el.assert_no_title(*@args) }
end
|
#matches?(actual) ⇒ Boolean
169
170
171
|
# File 'lib/capybara/rspec/matchers.rb', line 169
def matches?(actual)
wrap_matches?(actual) { |el| el.assert_title(*@args) }
end
|