Sha256: 3b31f6d1d465d8ac9081dbc0b2e3b2910b92b93db4834bd8cf1978584cb4d7b4
Contents?: true
Size: 695 Bytes
Versions: 8
Compression:
Stored size: 695 Bytes
Contents
require_relative "../spec_helper" require "cute_print/format/pretty_print" module CutePrint module Format describe PrettyPrint do let(:value) { (1..5).to_a } subject { PrettyPrint.new.format(width, value).to_a } context "fits on one line" do let(:width) { 80 } specify do expect(subject).to eq [ "[1, 2, 3, 4, 5]\n", ] end end context "needs multiple lines" do let(:width) { 5 } specify do expect(subject).to eq [ "[1,\n", " 2,\n", " 3,\n", " 4,\n", " 5]\n", ] end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems