require 'spec_helper' RSpec.describe Pluginscan::CheckFindings do describe "count" do subject(:check_findings) { Pluginscan::CheckFindings.new(check) } let(:check) { double('Check') } it "returns 0 when no issues were found" do expect(check_findings.count).to eq 0 end it "returns 3 when 3 issues were found" do finding = double('Finding') 3.times do check_findings.add [finding] end expect(check_findings.count).to eq 3 end end end