Sha256: 03eec4490f5cec91d0e1a432b79614ee68653cce749d0b0f2d65721ad0a731f6

Contents?: true

Size: 1.29 KB

Versions: 10

Compression:

Stored size: 1.29 KB

Contents

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

describe YardChecker do
  it "gives N/A on Error" do
    subject.stub('`' => 'Error')
    subject.result.should == { type: :yard, check_output: 'Error', status: 'N/A' }
  end
  it "gives OK with no Errors" do
    subject.stub('`' => '100.00% documented')
    subject.result.should == { type: :yard,
                               check_output: '',
                               status: "\e[32m100.0%\e[0m documented" }
  end
  describe "Code Coverage" do
    it "is green over 90%" do
      subject.stub('`' => "93.00% documented")
      subject.result.should == { type: :yard,
                                 check_output: '',
                                 status: "\e[32m93.0%\e[0m documented" }
    end
    it "is green over 70%" do
      subject.stub('`' => "73.00% documented")
      subject.result.should == { type: :yard,
                                 check_output: '',
                                 status: "\e[33m73.0%\e[0m documented" }
    end
    it "is green over 10%" do
      subject.stub('`' => "13.00% documented")
      subject.result.should == { type: :yard,
                                 check_output: '',
                                 status: "\e[31m13.0%\e[0m documented" }
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rake_check-0.1.8 spec/lib/rake_check/yard_checker_spec.rb
rake_check-0.1.7 spec/lib/rake_check/yard_checker_spec.rb
rake_check-0.1.6 spec_no_rails/lib/rake_check/yard_checker_spec.rb
rake_check-0.1.5 spec_no_rails/lib/rake_check/yard_checker_spec.rb
rake_check-0.1.4 spec_no_rails/lib/rake_check/yard_checker_spec.rb
rake_check-0.1.3 spec/lib/rake_check/yard_checker_spec.rb
rake_check-0.1.2 spec/lib/rake_check/yard_checker_spec.rb
rake_check-0.1.1 spec/lib/rake_check/yard_checker_spec.rb
rake_check-0.1.0 spec/lib/rake_check/yard_checker_spec.rb
rake_check-0.0.1 spec/lib/rake_check/yard_checker_spec.rb