Changeset 6472
- Timestamp:
- 03/27/07 14:17:01 (3 years ago)
- Files:
-
- tools/capistrano/lib/capistrano/cli/options.rb (modified) (2 diffs)
- tools/capistrano/test/cli/options_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tools/capistrano/lib/capistrano/cli/options.rb
r6457 r6472 31 31 "Displays help (if available) for the task." 32 32 ) { |value| options[:explain] = value } 33 34 opts.on("-F", "--default-config", 35 "Always use default config, even with -f." 36 ) { options[:default_config] = true } 33 37 34 38 opts.on("-f", "--file FILE", … … 111 115 options[:verbose] = 3 if !options.has_key?(:verbose) 112 116 113 look_for_default_recipe_file! if options[: recipes].empty?117 look_for_default_recipe_file! if options[:default_config] || options[:recipes].empty? 114 118 extract_environment_variables! 115 119 tools/capistrano/test/cli/options_test.rb
r6457 r6472 149 149 end 150 150 151 def test_F_should_search_for_default_recipes_even_if_f_is_given 152 @cli.expects(:look_for_default_recipe_file!) 153 @cli.args << "-Ff" << "hello" 154 @cli.parse_options! 155 end 156 151 157 def test_should_extract_env_vars_from_command_line 152 158 assert_nil ENV["HELLO"]