method

_pretty_print

rspec latest stable - Class: Spec::Matchers::Include

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (1.2.0) is shown here.

_pretty_print(array)
private

No documentation available.

# File lib/spec/matchers/include.rb, line 45
        def _pretty_print(array)
          result = ""
          array.each_with_index do |item, index|
            if index < (array.length - 2)
              result << "#{item.inspect}, "
            elsif index < (array.length - 1)
              result << "#{item.inspect} and "
            else
              result << "#{item.inspect}"
            end
          end
          result
        end