Sha256: 17211a9d19d300991296fc2b21e5cced768831f5ae34301af97fbd996ae06dbe

Contents?: true

Size: 623 Bytes

Versions: 17

Compression:

Stored size: 623 Bytes

Contents

module ::RSpec::Matchers::BuiltIn
  class StartAndEndWith
    def failure_message
      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
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
opal-rspec-1.1.0.alpha3 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-1.1.0.alpha2 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-1.1.0.alpha1 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-1.0.0 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-1.0.0.alpha1 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.8.0 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.8.0.alpha3 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.8.0.alpha2 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.8.0.alpha1 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.7.1 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.7.0 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.6.2 opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.7.0.rc.2 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.7.0.rc.1 lib-opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.6.1 opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.6.0 opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb
opal-rspec-0.6.0.beta1 opal/opal/rspec/fixes/rspec/matchers/built_in/start_and_end_with.rb