diff options
author | Arun Agrawal <arun@fromjaipur.com> | 2011-09-04 08:17:53 +0530 |
---|---|---|
committer | Arun Agrawal <arun@fromjaipur.com> | 2011-09-04 08:17:53 +0530 |
commit | 34618e6697475bca8b4bcfaaa2d55a99e78c031a (patch) | |
tree | e8976f6b317c7016638af3f3d3439ad6f6fcbf60 /railties | |
parent | 0a38e2a5ce2eaf7393958721edbfcf2a7fe87334 (diff) | |
download | rails-34618e6697475bca8b4bcfaaa2d55a99e78c031a.tar.gz rails-34618e6697475bca8b4bcfaaa2d55a99e78c031a.tar.bz2 rails-34618e6697475bca8b4bcfaaa2d55a99e78c031a.zip |
Warnings removed for using shadow variable.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 4 | ||||
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index a7462f39ba..c43a99e85c 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -119,8 +119,8 @@ module Rails if commands.is_a?(Symbol) run "git #{commands}" else - commands.each do |command, options| - run "git #{command} #{options}" + commands.each do |cmd, options| + run "git #{cmd} #{options}" end end end diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index d3074afd91..1534f0d828 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -191,11 +191,11 @@ module SharedCustomGeneratorTests end 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.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 } default_files.each{ |path| assert_no_file(path) } |