spec/tty/table/options_spec.rb in tty-0.0.11 vs spec/tty/table/options_spec.rb in tty-0.1.0

- old
+ new

@@ -1,25 +1,25 @@ -# -*- encoding: utf-8 -*- +# encoding: utf-8 require 'spec_helper' describe TTY::Table, 'options' do let(:rows) { [['a1', 'a2'], ['b1', 'b2']] } let(:widths) { nil } let(:aligns) { [] } let(:object) { described_class } let(:options) { { - :column_widths => widths, - :column_aligns => aligns, - :renderer => :basic + column_widths: widths, + column_aligns: aligns, + renderer: :basic } } - subject { object.new rows, options } + subject(:table) { object.new rows, options } - its(:header) { should be_nil } + it { expect(table.header).to be_nil } - its(:rows) { should == rows } + it { expect(table.rows).to eq(rows) } - its(:orientation) { should be_kind_of TTY::Table::Orientation::Horizontal } + it { expect(table.orientation).to be_kind_of TTY::Table::Orientation::Horizontal } end