Warnings removed for using shadow variable.

This commit is contained in:
Arun Agrawal 2011-09-04 08:17:53 +05:30
parent 0a38e2a5ce
commit 34618e6697
2 changed files with 4 additions and 4 deletions

View File

@ -119,8 +119,8 @@ module Rails
if commands.is_a?(Symbol) if commands.is_a?(Symbol)
run "git #{commands}" run "git #{commands}"
else else
commands.each do |command, options| commands.each do |cmd, options|
run "git #{command} #{options}" run "git #{cmd} #{options}"
end end
end end
end end

View File

@ -191,11 +191,11 @@ module SharedCustomGeneratorTests
end end
def test_builder_option_with_http def test_builder_option_with_http
path = "http://gist.github.com/103208.txt" url = "http://gist.github.com/103208.txt"
template = "class #{builder_class}; end" template = "class #{builder_class}; end"
template.instance_eval "def read; self; end" # Make the string respond to read template.instance_eval "def read; self; end" # Make the string respond to read
generator([destination_root], :builder => path).expects(:open).with(path, 'Accept' => 'application/x-thor-template').returns(template) generator([destination_root], :builder => url).expects(:open).with(url, 'Accept' => 'application/x-thor-template').returns(template)
quietly { generator.invoke_all } quietly { generator.invoke_all }
default_files.each{ |path| assert_no_file(path) } default_files.each{ |path| assert_no_file(path) }