Sha256: 1f2a843ff50d1bd620b761732053581552563515fff2b0eb8bb463c112a7ffeb

Contents?: true

Size: 411 Bytes

Versions: 3

Compression:

Stored size: 411 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe TTY::Table::Field, '#lines' do
  let(:object) { described_class.new value }

  subject { object.lines }

  context 'with escaped value' do
    let(:value) { "Multi\nLine" }

    it { is_expected.to eql(["Multi", "Line"]) }
  end

  context 'with unescaped value' do
    let(:value) { "Multi\\nLine" }

    it { is_expected.to eql(["Multi\\nLine"]) }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tty-0.1.2 spec/tty/table/field/lines_spec.rb
tty-0.1.1 spec/tty/table/field/lines_spec.rb
tty-0.1.0 spec/tty/table/field/lines_spec.rb