Sha256: 48cce3a40bffb4ef55cb8fd8c0164990ae0542f73ee52dc5029ae8ba9e1e1461

Contents?: true

Size: 880 Bytes

Versions: 4

Compression:

Stored size: 880 Bytes

Contents

require File.expand_path("../spec_helper", __FILE__)

module Danger
  describe Danger::DangerXccovSummary do
    it "should be a plugin" do
      expect(Danger::DangerXccovSummary.new(nil)).to be_a Danger::Plugin
    end

    #
    # You should test your custom attributes and methods here
    #
    describe "with Dangerfile" do
      before do
        @dangerfile = testing_dangerfile
        @my_plugin = @dangerfile.xccov_summary
        @my_plugin.total_coverage_markdown("70.99")

        # mock the PR data
        # you can then use this, eg. github.pr_author, later in the spec
        json = File.read(File.dirname(__FILE__) + '/support/fixtures/github_pr.json') # example json: `curl https://api.github.com/repos/danger/danger-plugin-template/pulls/18 > github_pr.json`
        allow(@my_plugin.github).to receive(:pr_json).and_return(json)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
danger-xccov_summary-0.0.10 spec/xccov_summary_spec.rb
danger-xccov_summary-0.0.9 spec/xccov_summary_spec.rb
danger-xccov_summary-0.0.8 spec/xccov_summary_spec.rb
danger-xccov_summary-0.0.7 spec/xccov_summary_spec.rb