Sha256: de9fa46f52d63b323a4532eb189212144bfdfa5037d1ab2a31bace555d36ae50
Contents?: true
Size: 1.09 KB
Versions: 4
Compression:
Stored size: 1.09 KB
Contents
require 'spec_helper' module LicenseFinder describe Reporter do describe "#write_reports" do subject { Reporter.write_reports } before do Dependency.stub(:acknowledged) { [double(:dep)] } MarkdownReport.stub(:of) { 'markdown report' } DetailedTextReport.stub(:of) { 'detailed csv report' } TextReport.stub(:of) { 'csv report' } HtmlReport.stub(:of) { 'html report' } end it "writes an html file" do subject LicenseFinder.config.artifacts.text_file.read.should == "csv report\n" LicenseFinder.config.artifacts.detailed_text_file.read.should == "detailed csv report\n" LicenseFinder.config.artifacts.markdown_file.read.should == "markdown report\n" LicenseFinder.config.artifacts.html_file.read.should == "html report\n" end it "deletes old dependencies.txt file" do fake_file = double(:fake_file, :exist? => true) LicenseFinder.config.artifacts.stub(:legacy_text_file) { fake_file } fake_file.should_receive(:delete) subject end end end end
Version data entries
4 entries across 4 versions & 1 rubygems