spec/cli_spec.rb in fukuzatsu-1.0.4 vs spec/cli_spec.rb in fukuzatsu-1.0.5

- old
+ new

@@ -28,16 +28,10 @@ before do allow(cli).to receive(:summaries) { [summary_1, summary_2] } end - describe "#complexities" do - it "extracts complexities from its file summaries" do - expect(cli.send(:complexities)).to eq([13,11]) - end - end - describe "#formatter" do it "returns a csv formatter" do allow(cli).to receive(:options) { {'format' => 'csv'} } expect(cli.send(:formatter)).to eq Formatters::Csv end @@ -46,40 +40,9 @@ expect(cli.send(:formatter)).to eq Formatters::Html end it "returns a text formatter" do allow(cli).to receive(:options) { {'format' => 'text'} } expect(cli.send(:formatter)).to eq Formatters::Text - end - end - - describe "#report" do - it "does not report if format is text" do - allow(cli).to receive(:options) { {'format' => 'text'} } - expect(cli.send(:report)).to be_nil - end - end - - describe "#report_complexity" do - it "does not report if threshold is not set" do - expect(cli.send(:report_complexity)).to be_nil - end - - it "does not report if threshold is respected" do - allow(cli).to receive(:options) { {'threshold' => 15} } - allow(cli).to receive(:complexities) { [0,13,11] } - expect(cli.send(:report_complexity)).to be_nil - - end - end - - describe "#results_files" do - it "extracts results files from its file summaries" do - expect(cli.send(:results_files)).to eq( - [ - "doc/fukuzatsu/file_1.rb.htm", - "doc/fukuzatsu/file_2.rb.htm" - ] - ) end end end