diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-14 21:27:52 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-11-14 21:27:52 +0200 |
commit | 3c16243fc8dbddcacf6da58866efea3aa46cfcde (patch) | |
tree | ed9dccae58c3e808113da95caea986f5fe3cc9e6 /spec/lib | |
parent | a62a304249f7fcd7fca0123986d170cac8fd75db (diff) | |
download | gitlab-ci-3c16243fc8dbddcacf6da58866efea3aa46cfcde.tar.gz |
Improve parser. tests added
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/ansi2html_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/lib/ansi2html_spec.rb b/spec/lib/ansi2html_spec.rb index 73700c1..dbbd1e9 100644 --- a/spec/lib/ansi2html_spec.rb +++ b/spec/lib/ansi2html_spec.rb @@ -21,7 +21,15 @@ describe Ansi2html do Ansi2html::convert("\e[90mHello\e[0m").should == '<span class="grey">Hello</span>' end - it "white bold boys have more fun" do - Ansi2html::convert("\e[37m\e[1mHello\e[0m\e[0m").should == '<span class="white"><span class="bold">Hello</span></span>' + it "ignore nested bold" do + Ansi2html::convert("\e[37m\e[1mHello\e[0m\e[0m").should == '<span class="white">Hello</span>' + end + + it "should print cucumber style" do + Ansi2html::convert("\e[1;32mScenario:\e[0m").should == '<span class="green">Scenario:</span>' + end + + it 'should always close tags' do + Ansi2html::convert("\e[1;32mScenario: User sign up").should == '<span class="green">Scenario: User sign up</span>' end end |