Method: RSpec::Matchers#start_with
- Defined in:
- lib/rspec/matchers.rb
#start_with(*expected) ⇒ Object Also known as: a_collection_starting_with, a_string_starting_with, starting_with
Matches if the actual value starts with the expected value(s). In the
case of a string, matches against the first expected.length characters
of the actual string. In the case of an array, matches against the first
expected.length elements of the actual array.
828 829 830 |
# File 'lib/rspec/matchers.rb', line 828 def start_with(*expected) BuiltIn::StartWith.new(*expected) end |