Class: Dommy::RSpec::CapyStyleMatchers::HaveButton Private
- Defined in:
- lib/dommy/rspec/capy_style_matchers.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(text, **opts) ⇒ HaveButton
constructor
private
A new instance of HaveButton.
Methods inherited from Base
#description, #does_not_match?, #failure_message, #failure_message_when_negated, #matches?
Constructor Details
#initialize(text, **opts) ⇒ HaveButton
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of HaveButton.
266 267 268 269 270 |
# File 'lib/dommy/rspec/capy_style_matchers.rb', line 266 def initialize(text, **opts) # Buttons are <button> elements OR <input type="submit|button|reset">. super("button, input[type='submit'], input[type='button'], input[type='reset']", text: text, **opts) @type_filter = opts[:type] end |