Class: RSpec::Matchers::BuiltIn::StartAndEndWith
- Inherits:
-
Object
- Object
- RSpec::Matchers::BuiltIn::StartAndEndWith
- Defined in:
- opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
Instance Method Summary collapse
Instance Method Details
#failure_message ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb', line 3 def msg = super if @actual_does_not_have_ordered_elements msg += ", but it does not have ordered elements" elsif !actual.respond_to?(:[]) msg += ", but it cannot be indexed using #[]" end msg # string mutation # super.tap do |msg| # if @actual_does_not_have_ordered_elements # msg << ", but it does not have ordered elements" # elsif !actual.respond_to?(:[]) # msg << ", but it cannot be indexed using #[]" # end # end end |