Sha256: 512ffeceaca9c4895f0da5f2c1121f5236d52d51a92d666ea04536193d19e447
Contents?: true
Size: 586 Bytes
Versions: 126
Compression:
Stored size: 586 Bytes
Contents
# frozen_string_literal: true RSpec.describe :indent do link :indent, from: :ree_string it { expect(indent(" foo", 2)).to eq(" foo") expect(indent("foo\n\t\tbar", 2)).to eq("\t\tfoo\n\t\t\t\tbar") expect(indent("foo", 2, indent_string: "\t")).to eq("\t\tfoo") expect(indent("foo\n\nbar", 2, empty_lines: true)).to eq(" foo\n \n bar") string = "\t\tdef some_method(x, y)\n\t\t\t\tsome_code\n\t\tend" result = "....\t\tdef some_method(x, y)\n....\t\t\t\tsome_code\n....\t\tend" expect(indent(string, 4, indent_string: ".")).to eq(result) } end
Version data entries
126 entries across 126 versions & 1 rubygems