Sha256: 9815f9a19b982c0526337a2f4bace310e9f19ca55ef309df4d2561fbd6c1b3fe
Contents?: true
Size: 994 Bytes
Versions: 1
Compression:
Stored size: 994 Bytes
Contents
# frozen_string_literal: true require File.expand_path("spec_helper", __dir__) module Danger describe Danger::DangerChikuwa do it "should be a plugin" do expect(Danger::DangerChikuwa.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.chikuwa end it "Errors on file not found" do @my_plugin.report "no file" expect(@dangerfile.status_report[:errors]).to eq(["build log file not found"]) end it "Report" do file_path = "#{File.dirname(__FILE__)}/fixtures/build.log" @my_plugin.report file_path expect(@dangerfile.status_report[:warnings]).to eq(["Parameter 'context' is never used, could be renamed to _"]) expect(@dangerfile.status_report[:errors]).to eq(["Unresolved reference: chikuwa"]) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
danger-chikuwa-0.0.1 | spec/chikuwa_spec.rb |