method
_pretty_print
RSpec latest stable (1.3.1)
-
0 notes -
Class: Spec::Matchers::MatchArray
- 1.1.4
- 1.1.12 (0)
- 1.2.0 (0)
- 1.2.8
- 1.3.0
- 1.3.1
- What's this?
_pretty_print(array)
private
Hide source
# File lib/spec/matchers/match_array.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