Sha256: fafa305f3510410549d6a6e64741483c55ea4e0a09d045028087e1366c1f13bc
Contents?: true
Size: 814 Bytes
Versions: 8
Compression:
Stored size: 814 Bytes
Contents
require_relative "spec_helper" require "cute_print/outline_labeler" module CutePrint describe OutlineLabeler do let(:label) { "foo.rb:1: " } let(:value) { [1, 2, 3, 4, 5] } subject { OutlineLabeler.label(formatter, width, label, value) } context "single line" do let(:formatter) { Format::Inspect.new } let(:width) { 80 } specify do expect(subject).to eq [ "foo.rb:1: [1, 2, 3, 4, 5]\n", ] end end context "multiple lines" do let(:formatter) { Format::PrettyPrint.new } let(:width) { 4 } specify do expect(subject).to eq [ "foo.rb:1: [1,\n", " 2,\n", " 3,\n", " 4,\n", " 5]\n", ] end end end end
Version data entries
8 entries across 8 versions & 1 rubygems