Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix --dry-run option ignored when set via profile. Fixes #248. #255

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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