mirror of https://github.com/rails/rails
Warnings removed for using shadow variable.
This commit is contained in:
parent
0a38e2a5ce
commit
34618e6697
|
@ -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
|
||||||
|
|
|
@ -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) }
|
||||||
|
|
Loading…
Reference in New Issue