Sha256: 63110ff872a485badefd248278c05fbdb298358ce2ca6f3558c6a41ac57811e3

Contents?: true

Size: 922 Bytes

Versions: 5

Compression:

Stored size: 922 Bytes

Contents

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

describe CucumberChecker do
  it "gives N/A on Error" do
    Dir.stub(:[] => [stub])
    subject.stub(:`).and_return('Error')
    subject.result.should == { type: :cucumber, check_output: '', status: 'N/A' }
  end
  it "gives OK with no Errors" do
    Dir.stub :[] => [stub]
    subject.stub(:`).and_return('8 scenarios (8 passed)')
    subject.result.should == { type: :cucumber,
                               check_output: '',
                               status: "\e[32mOK\e[0m" }
  end
  it "is red on Error" do
    Dir.stub :[] => [stub]
    subject.stub(:`).and_return('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

5 entries across 5 versions & 1 rubygems

Version Path
rake_check-0.3.5 spec/lib/rake_check/cucumber_checker_spec.rb
rake_check-0.3.4 spec/lib/rake_check/cucumber_checker_spec.rb
rake_check-0.3.3 spec/lib/rake_check/cucumber_checker_spec.rb
rake_check-0.3.2 spec/lib/rake_check/cucumber_checker_spec.rb
rake_check-0.3.1 spec/lib/rake_check/cucumber_checker_spec.rb