spec/tty/table/render_with_spec.rb in tty-0.0.11 vs spec/tty/table/render_with_spec.rb in tty-0.1.0
- old
+ new
@@ -12,11 +12,12 @@
expect { table.render_with String }.to raise_error(TTY::TypeError)
end
it "doesn't implement def_border" do
klass = Class.new(TTY::Table::Border)
- expect { table.render_with klass }.to raise_error(TTY::NoImplementationError)
+ expect { table.render_with klass }.
+ to raise_error(TTY::NoImplementationError)
end
end
context 'with complete border' do
before {
@@ -40,11 +41,11 @@
end
end
}
it 'displays custom border' do
- table.render_with(MyBorder).should == <<-EOS.normalize
+ expect(table.render_with(MyBorder)).to eq <<-EOS.normalize
*==*==*==*
$h1$h2$h3$
*==*==*==*
$a1$a2$a3$
$b1$b2$b3$
@@ -67,11 +68,11 @@
end
end
}
it 'displays border' do
- table.render_with(MyBorder).should == <<-EOS.normalize
+ expect(table.render_with(MyBorder)).to eq <<-EOS.normalize
$h1$h2$h3$
$a1$a2$a3$
$b1$b2$b3$
* * * *
EOS
@@ -90,10 +91,10 @@
it 'displays border' do
result = table.render_with MyBorder do |renderer|
renderer.border.style = :red
end
- result.should == <<-EOS.normalize
+ expect(result).to eq <<-EOS.normalize
\e[31m|\e[0mh1\e[31m\e[0mh2\e[31m\e[0mh3\e[31m|\e[0m
\e[31m|\e[0ma1\e[31m\e[0ma2\e[31m\e[0ma3\e[31m|\e[0m
\e[31m|\e[0mb1\e[31m\e[0mb2\e[31m\e[0mb3\e[31m|\e[0m
EOS
end