Skip to content

Commit

Permalink
Add --quiet option to hide all development add information
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Wilk committed Oct 31, 2008
1 parent a7e99a6 commit 57e96e3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions History.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ in the inside string. If the triple quotes are indented 4 spaces, then the text
spaces removed too.

=== New features
* Added --quiet option to hide all development aid output when using Pretty formatter (#69 Joseph Wilk)
* Added --no-snippets option to hide snippets for pending steps when using Pretty formatter (#69 Joseph Wilk)
* Added Autotest support - work in progress... (Peter Jaros)
* Added new --exclude option (Bryan Helkamp)
Expand Down
4 changes: 4 additions & 0 deletions lib/cucumber/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ def parse_options!(args)
opts.on("-i", "--no-snippets", "Don't show the snippets for pending steps") do
@options[:snippets] = false
end
opts.on("-q", "--quiet", "Don't show any development aid information") do
@options[:snippets] = false
@options[:source] = false
end
opts.on_tail("--version", "Show version") do
puts VERSION::STRING
exit
Expand Down
9 changes: 9 additions & 0 deletions spec/cucumber/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,18 @@ def mock_broadcaster(stubs = {})
it "should accept --no-snippets option" do
cli = CLI.new
cli.parse_options!(%w{--no-snippets})

cli.options[:snippets].should be_false
end

it "should accept --quiet option" do
cli = CLI.new
cli.parse_options!(%w{--quiet})

cli.options[:snippets].should be_false
cli.options[:source].should be_false
end

it "should accept --out option" do
cli = CLI.new
File.should_receive(:open).with('jalla.txt', 'w')
Expand Down

0 comments on commit 57e96e3

Please sign in to comment.