Sha256: 2e98b965cca43810cd8123a4b80f6f644aaf71f64d8ef065c27d3b39b0241d65

Contents?: true

Size: 919 Bytes

Versions: 22

Compression:

Stored size: 919 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
require 'json'

describe Slather::CoverageService::GutterJsonOutput do

  let(:fixtures_project) do
    proj = Slather::Project.open(FIXTURES_PROJECT_PATH)
    proj.build_directory = TEMP_DERIVED_DATA_PATH
    proj.input_format = "profdata"
    proj.coverage_service = "gutter_json"
    proj.configure
    proj
  end

  describe '#coverage_file_class' do
    it "should return CoverageFile" do
      expect(fixtures_project.send(:coverage_file_class)).to eq(Slather::ProfdataCoverageFile)
    end
  end

  describe '#post' do
    it "should print out the coverage for each file, and then total coverage" do
      fixtures_project.post

      fixture_json = File.read(FIXTURES_GUTTER_JSON_PATH)
      current_json = File.read('.gutter.json')

      expect(current_json).to be_json_eql(fixture_json)
      File.unlink('.gutter.json')
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
slather-2.8.5 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.8.4 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.8.3 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.8.2 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.8.1 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.8.0 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.7.5 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.7.4 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.7.3 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.7.2 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.7.1 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.7.0 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.6.1 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.6.0 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.5.0 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.4.9 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.4.8 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.4.7 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.4.6 spec/slather/coverage_service/gutter_json_spec.rb
slather-2.4.5 spec/slather/coverage_service/gutter_json_spec.rb