Class: Minicrest::StartsWith
- Inherits:
-
StringMatcher
- Object
- Matcher
- StringMatcher
- Minicrest::StartsWith
- Defined in:
- lib/minicrest/starts_with.rb
Overview
Matcher that checks if a string starts with a given prefix.
Instance Method Summary collapse
-
#initialize(prefix) ⇒ StartsWith
constructor
Creates a new starts_with matcher.
Methods inherited from StringMatcher
#description, #failure_message, #matches?, #negated_failure_message
Methods inherited from Matcher
#&, #description, #failure_message, #matches?, #negated_failure_message, #|
Constructor Details
#initialize(prefix) ⇒ StartsWith
Creates a new starts_with matcher.
16 17 18 |
# File 'lib/minicrest/starts_with.rb', line 16 def initialize(prefix) super(prefix, :start_with?, 'start with') end |