Class: Dommy::RSpec::CapyStyleMatchers::HaveButton Private

Inherits:
Base
  • Object
show all
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

HaveNoButton

Instance Method Summary collapse

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.



274
275
276
277
278
# File 'lib/dommy/rspec/capy_style_matchers.rb', line 274

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