Sha256: 1158a2939cd9bf3619398d5395894f6bee6722362d1f7c47a3c56950581e5a4b
Contents?: true
Size: 557 Bytes
Versions: 10
Compression:
Stored size: 557 Bytes
Contents
# coding: utf-8 require 'spec_helper' RSpec.describe TTY::Table, '#<<' do let(:rows) { ['a', 'b', 'c'] } let(:object) { described_class } subject(:table) { object[rows] } context 'with primitive values' do let(:row) { [1, 2, 3] } it 'extracts values correctly' do table << row expect(table.to_a.last).to eql(row) end end context 'with complex values' do let(:row) { [1, { value: 2 }, 3] } it 'extracts values correctly' do table << row expect(table.to_a.last).to eql([1,2,3]) end end end
Version data entries
10 entries across 10 versions & 1 rubygems