Skip to content

Commit

Permalink
Fix --dry-run option ignored when set via profile. Fixes cucumber#248.
Browse files Browse the repository at this point in the history
  • Loading branch information
iafonov committed Mar 29, 2012
1 parent 43d30a7 commit 4cc03f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/cucumber/cli/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ def reverse_merge(other_options)
@options[:source] &= other_options[:source]
@options[:snippets] &= other_options[:snippets]
@options[:strict] |= other_options[:strict]
@options[:dry_run] |= other_options[:dry_run]

@profiles += other_options.profiles
@expanded_args += other_options.expanded_args
Expand Down
6 changes: 6 additions & 0 deletions spec/cucumber/cli/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,12 @@ def reset_config
config.dry_run?.should be_true
end

it "returns true when --dry-run was specified in yaml file" do
given_cucumber_yml_defined_as({'default' => '--dry-run'})
config.parse!([])
config.dry_run?.should be_true
end

it "returns false by default" do
config.parse!([])
config.dry_run?.should be_false
Expand Down

0 comments on commit 4cc03f1

Please sign in to comment.