Sha256: 144a2e860842b9361ede2b68ec800ac9cb63b0f5f7f8044f86029c29e8b8d9d3

Contents?: true

Size: 419 Bytes

Versions: 9

Compression:

Stored size: 419 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'spec_helper'

describe TTY::Table::Operation::AlignmentSet, '#each' do
  let(:alignments) { [:left, :center, :right] }
  let(:yields) { [] }
  let(:object) { described_class.new alignments }

  subject { object.each { |alignment| yields << alignment } }

  it 'yields each alignment' do
    expect { subject }.to change { yields.dup }.
      from([]).
      to(alignments)
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tty-0.0.11 spec/tty/table/operation/alignment_set/each_spec.rb
tty-0.0.10 spec/tty/table/operation/alignment_set/each_spec.rb
tty-0.0.9 spec/tty/table/operation/alignment_set/each_spec.rb
tty-0.0.8 spec/tty/table/operation/alignment_set/each_spec.rb
tty-0.0.7 spec/tty/table/operation/alignment_set/each_spec.rb
tty-0.0.6 spec/tty/table/operation/alignment_set/each_spec.rb
tty-0.0.5 spec/tty/table/operation/alignment_set/each_spec.rb
tty-0.0.4 spec/tty/table/operation/alignment_set/each_spec.rb
tty-0.0.3 spec/tty/table/operation/alignment_set/each_spec.rb