spec/grepg/parser_spec.rb in grepg-0.0.8 vs spec/grepg/parser_spec.rb in grepg-0.0.9

- old
+ new

@@ -35,9 +35,15 @@ parser = GrepPage::Parser.new('-u kdavis -t css -c'.split(' ')) output = capture_stdout { parser.run! } expect(output.inspect).to include("\\e[0;34;49m") end + it "does not colorize output of the result" do + parser = GrepPage::Parser.new('-u kdavis -t css --no-colorize'.split(' ')) + output = capture_stdout { parser.run! } + expect(output.inspect).not_to include("\\e[0;34;49m") + end + # Test if defaut file gets read it "reads username from the defaults file" do expect(File).to receive(:exist?).and_return(true) expect(IO).to receive(:read).with(ENV['HOME'] + '/.grepg.yml').and_return({ "user" => "kdavis"