spec/cli_spec.rb in sandi_meter-1.1.7 vs spec/cli_spec.rb in sandi_meter-1.1.8

- old
+ new

@@ -22,7 +22,23 @@ it 'opens the graph in a web browser' do cli.should_receive(:open_in_browser) expect { cli.execute }.to raise_error(SystemExit) end end + + context 'with the quiet flag passed in' do + before do + ARGV.push('-q') + ARGV.push('-g') + end + after do + ARGV.pop + ARGV.pop + end + + it 'does not open the browser' do + cli.should_not_receive(:open_in_browser) + expect { cli.execute }.to raise_error(SystemExit) + end + end end end