Sha256: 0c1b0b8ee7f5ad7ac14c2b97f4b41bfb8a9cbb0141dd763239767beab9df1080
Contents?: true
Size: 1.08 KB
Versions: 3
Compression:
Stored size: 1.08 KB
Contents
require 'spec_helper' module LicenseFinder describe Reporter do describe "#write_reports" do subject { Reporter.write_reports } before do Dependency.stub(:all) { [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
3 entries across 3 versions & 1 rubygems