Sha256: fd6912c082f214716eaeb4c349400b82fa67254f6021ceebff0cb1267028b7cf
Contents?: true
Size: 1.35 KB
Versions: 2
Compression:
Stored size: 1.35 KB
Contents
require 'spec_helper' describe SimpleCov::Formatter::TeamcitySummaryFormatter do describe "#format" do before do expect_any_instance_of(described_class).to receive(:format_teamcity).with(:arg).and_return(:return_value) expect_any_instance_of(described_class).to receive(:puts).with(:return_value) end subject { described_class.new.format(:arg) } it { expect(subject).to be_nil } end describe "#format_teamcity" do let(:simplecov_result) { OpenStruct.new({covered_percent: '12.34567', covered_lines: '1234', total_lines: '5678' })} let(:open_block) { "##teamcity[blockOpened name='Code Coverage Summary']" } let(:coverage_percent) { "##teamcity[buildStatisticValue key='CodeCoverageL' value='12.34567']" } let(:covered_lines) { "##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='1234']" } let(:total_lines) { "##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='5678']" } let(:close_block) { "##teamcity[blockClosed name='Code Coverage Summary']" } subject { described_class.new.format_teamcity(simplecov_result) } it { expect(subject).to include(open_block) } it { expect(subject).to include(coverage_percent) } it { expect(subject).to include(covered_lines) } it { expect(subject).to include(total_lines) } it { expect(subject).to include(close_block) } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simplecov-teamcity-summary-0.1.2 | spec/lib/formatter_spec.rb |
simplecov-teamcity-summary-0.1.1 | spec/lib/formatter_spec.rb |