Sha256: 9182fc5e2054bd78bd7f131fc51f9ec34520297607be4fec479c4ad099f654a0
Contents?: true
Size: 1.24 KB
Versions: 16
Compression:
Stored size: 1.24 KB
Contents
require "spec_helper" module LicenseFinder module CLI describe IgnoredDependencies do let(:decisions) { Decisions.new } before do allow(Decisions).to receive(:fetch_saved) { decisions } end describe "list" do context "when there is at least one ignored dependency" do it "shows the ignored dependencies" do decisions.ignore("bundler") expect(capture_stdout { subject.list }).to match /bundler/ end end context "when there are no ignored dependencies" do it "prints '(none)'" do expect(capture_stdout { subject.list }).to match /\(none\)/ end end end describe "add" do it "adds the specified group to the ignored groups list" do silence_stdout do subject.add("test") end expect(subject.decisions.ignored).to eq ["test"].to_set end end describe "remove" do it "removes the specified group from the ignored groups list" do silence_stdout do subject.add("test") subject.remove("test") end expect(subject.decisions.ignored).to be_empty end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems