Sha256: 5a00bdf20461dc846e70956439e11aa59b2f8d648225f36d1868ba4b303db9bd

Contents?: true

Size: 840 Bytes

Versions: 6

Compression:

Stored size: 840 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(:`).and_return('Error')
    subject.result.should == { type: :cucumber, check_output: '', status: 'N/A' }
  end
  it "gives OK with no Errors" do
    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
    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

6 entries across 6 versions & 1 rubygems

Version Path
rake_check-0.3.0 spec/lib/rake_check/cucumber_checker_spec.rb
rake_check-0.2.2 spec/lib/rake_check/cucumber_checker_spec.rb
rake_check-0.2.1 spec/lib/rake_check/cucumber_checker_spec.rb
rake_check-0.2 spec/lib/rake_check/cucumber_checker_spec.rb
rake_check-0.1.11 spec/lib/rake_check/cucumber_checker_spec.rb
rake_check-0.1.10 spec/lib/rake_check/cucumber_checker_spec.rb