Sha256: 2c9535f7bbc3fed02b809cbb0414ff0dfb6424fdd9a2a53cefc0ca52887b7302

Contents?: true

Size: 816 Bytes

Versions: 2

Compression:

Stored size: 816 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../../lib/rake_check/cucumber_checker')

describe CucumberChecker do
  it "gives N/A on Error" do
    subject.stub('`' => 'Error')
    subject.result.should == { type: :cucumber, check_output: '', status: 'N/A' }
  end
  it "gives OK with no Errors" do
    subject.stub('`' => '8 scenarios (8 passed)')
    subject.result.should == { type: :cucumber,
                               check_output: '',
                               status: "\e[32mOK\e[0m" }
  end
  it "is red on Error" do
    subject.stub('`' => "8 scenarios (1 failed, 7 passed)")
    subject.result.should == { type: :cucumber,
                               check_output: '8 scenarios (1 failed, 7 passed)',
                               status: "\e[31m1 failed scenarios\e[0m" }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rake_check-0.1.8 spec/lib/rake_check/cucumber_checker_spec.rb
rake_check-0.1.7 spec/lib/rake_check/cucumber_checker_spec.rb