Class: RSpec::TagMatchers::HasTimeSelect
- Inherits:
-
MultipleInputMatcher
- Object
- MultipleInputMatcher
- RSpec::TagMatchers::HasTimeSelect
- Defined in:
- lib/rspec/tag_matchers/has_time_select.rb
Overview
A matcher that matches Rails' time_select drop-downs.
Instance Method Summary (collapse)
-
- (String) description
Returns a description of the matcher's criteria.
-
- (String) failure_message
Returns an explanation of why the matcher failed to match with should.
-
- (HasTimeSelect) initialize
constructor
Initializes a HasTimeSelect matcher.
-
- (String) negative_failure_message
Returns an explanation of why the matcher failed to match with should_not.
Methods inherited from MultipleInputMatcher
Constructor Details
- (HasTimeSelect) initialize
Initializes a HasTimeSelect matcher.
18 19 20 |
# File 'lib/rspec/tag_matchers/has_time_select.rb', line 18 def initialize super('4i' => HasSelect.new, '5i' => HasSelect.new) end |
Instance Method Details
- (String) description
Returns a description of the matcher's criteria.
25 26 27 |
# File 'lib/rspec/tag_matchers/has_time_select.rb', line 25 def description [basic_description, extra_description].compact.join(" ") end |
- (String) failure_message
Returns an explanation of why the matcher failed to match with should.
32 33 34 |
# File 'lib/rspec/tag_matchers/has_time_select.rb', line 32 def "expected document to #{description}; got: #{@rendered}" end |
- (String) negative_failure_message
Returns an explanation of why the matcher failed to match with should_not.
39 40 41 |
# File 'lib/rspec/tag_matchers/has_time_select.rb', line 39 def "expected document to not #{description}; got: #{@rendered}" end |