Sha256: af7fb4186d0d29e6a30c06d00cde4e5c2f5e8c58f623089bb90f089c111a61e6
Contents?: true
Size: 1019 Bytes
Versions: 1
Compression:
Stored size: 1019 Bytes
Contents
require File.expand_path('../spec_helper', __FILE__) module Danger describe Danger::DangerSimpleCovJson do it 'should be a plugin' do expect(Danger::DangerSimpleCovJson.new(nil)).to be_a Danger::Plugin end describe 'with Dangerfile' do before do @dangerfile = testing_dangerfile @simplecov = @dangerfile.simplecov end # Some examples for writing tests # You should replace these with your own. it 'Shows code coverage report' do monday_date = Date.parse('2016-07-11') allow(Date).to receive(:today).and_return monday_date @simplecov.report('spec/fixtures/coverage.json') expect(@dangerfile.status_report[:messages]).to eq(['Code coverage is now at 99.15% (1512/1525 lines)']) end it 'Fails if code coverage not found' do @simplecov.report('spec/fixtures/missing_file.json') expect(@dangerfile.status_report[:errors]).to eq(['Code coverage data not found']) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
danger-simplecov_json-0.1.0 | spec/simplecov_json_spec.rb |