spec/tty/table/border/null/rendering_spec.rb in tty-0.0.11 vs spec/tty/table/border/null/rendering_spec.rb in tty-0.1.0

- old
+ new

@@ -1,6 +1,6 @@ -# -*- encoding: utf-8 -*- +# encoding: utf-8 require 'spec_helper' describe TTY::Table::Border::Null, '#rendering' do let(:border) { nil } @@ -10,55 +10,55 @@ context 'with empty row' do let(:row) { TTY::Table::Row.new([]) } let(:column_widths) { [] } it 'draws top line' do - subject.top_line.should be_nil + expect(subject.top_line).to be_nil end it 'draws middle line' do - subject.separator.should be_nil + expect(subject.separator).to be_nil end it 'draw bottom line' do - subject.bottom_line.should be_nil + expect(subject.bottom_line).to be_nil end it 'draws row line' do - subject.row_line(row).should == '' + expect(subject.row_line(row)).to eq('') end end context 'with row' do let(:row) { TTY::Table::Row.new(['a1', 'a2', 'a3']) } let(:column_widths) { [2,2,2] } it 'draws top line' do - subject.top_line.should be_nil + expect(subject.top_line).to be_nil end it 'draw middle line' do - subject.separator.should be_nil + expect(subject.separator).to be_nil end it 'draw bottom line' do - subject.bottom_line.should be_nil + expect(subject.bottom_line).to be_nil end it 'draws row line' do - subject.row_line(row).should == 'a1 a2 a3' + expect(subject.row_line(row)).to eq('a1 a2 a3') end end context 'with multiline row' do let(:column_widths) { [2,2,2] } context 'with mixed data' do let(:row) { TTY::Table::Row.new(["a1\nb1\nc1", 'a2', 'a3']) } it 'draws row line' do - subject.row_line(row).should == <<-EOS.normalize + expect(subject.row_line(row)).to eq <<-EOS.normalize a1 a2 a3 b1 c1 EOS end @@ -66,11 +66,11 @@ context 'with sparse data' do let(:row) { TTY::Table::Row.new(["a1\n\n", "\na2\n", "\n\na3"]) } it 'draws row line' do - subject.row_line(row).should == <<-EOS.chomp + expect(subject.row_line(row)).to eq <<-EOS.chomp a1 a2 a3 EOS end @@ -78,10 +78,10 @@ context 'with empty data' do let(:row) { TTY::Table::Row.new(["\na1\n", "\na2\n", "\na3\n"]) } it 'draws row line' do - subject.row_line(row).should == <<-EOS.chomp + expect(subject.row_line(row)).to eq <<-EOS.chomp a1 a2 a3 EOS end