From 11b9e224d7a0bacf7dbe37b1c1c93370e35ce7cb Mon Sep 17 00:00:00 2001 From: Chase Stubblefield Date: Tue, 27 Mar 2012 19:28:03 -0700 Subject: [PATCH] Add --no-drb command line option This is useful if you use --drb as a default option (for use with Spork) --- lib/cucumber/cli/options.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/cucumber/cli/options.rb b/lib/cucumber/cli/options.rb index 05ee9abe6a..06a39ca8a5 100644 --- a/lib/cucumber/cli/options.rb +++ b/lib/cucumber/cli/options.rb @@ -38,6 +38,7 @@ class Options "on Ruby's LOAD_PATH, for example in a Ruby gem." ] DRB_FLAG = '--drb' + DRB_OPTIONAL_FLAG = '--[no-]drb' PROFILE_SHORT_FLAG = '-p' NO_PROFILE_SHORT_FLAG = '-P' PROFILE_LONG_FLAG = '--profile' @@ -261,8 +262,8 @@ def parse!(args) opts.on("-x", "--expand", "Expand Scenario Outline Tables in output.") do @options[:expand] = true end - opts.on(DRB_FLAG, "Run features against a DRb server. (i.e. with the spork gem)") do - @options[:drb] = true + opts.on(DRB_OPTIONAL_FLAG, "Run features against a DRb server. (i.e. with the spork gem)") do |drb| + @options[:drb] = drb end opts.on("--port PORT", "Specify DRb port. Ignored without --drb") do |port| @options[:drb_port] = port