aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-09-27 15:18:35 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-09-27 16:43:17 -0300
commit1ab2ab07b5e7c4031c014175887e9f20b8f60a4c (patch)
treec2cc5c3dac7623044599b25b4b3239a5b6ad6142 /actionpack/test
parent2f326b7f27349b933fe617d83b3f80c6573ce5d8 (diff)
downloadrails-1ab2ab07b5e7c4031c014175887e9f20b8f60a4c.tar.gz
rails-1ab2ab07b5e7c4031c014175887e9f20b8f60a4c.tar.bz2
rails-1ab2ab07b5e7c4031c014175887e9f20b8f60a4c.zip
Remove more warnings shadowing outer local variable.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/dispatch/response_test.rb16
-rw-r--r--actionpack/test/template/text_helper_test.rb2
2 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb
index 1efb664304..cd0418c338 100644
--- a/actionpack/test/dispatch/response_test.rb
+++ b/actionpack/test/dispatch/response_test.rb
@@ -120,10 +120,10 @@ class ResponseTest < ActiveSupport::TestCase
end
test "read cache control" do
- resp = ActionDispatch::Response.new.tap { |_resp|
- _resp.cache_control[:public] = true
- _resp.etag = '123'
- _resp.body = 'Hello'
+ resp = ActionDispatch::Response.new.tap { |response|
+ response.cache_control[:public] = true
+ response.etag = '123'
+ response.body = 'Hello'
}
resp.to_a
@@ -135,10 +135,10 @@ class ResponseTest < ActiveSupport::TestCase
end
test "read charset and content type" do
- resp = ActionDispatch::Response.new.tap { |_resp|
- _resp.charset = 'utf-16'
- _resp.content_type = Mime::XML
- _resp.body = 'Hello'
+ resp = ActionDispatch::Response.new.tap { |response|
+ response.charset = 'utf-16'
+ response.content_type = Mime::XML
+ response.body = 'Hello'
}
resp.to_a
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index 43e920f9b5..9e9ed9120d 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -491,7 +491,7 @@ class TextHelperTest < ActionView::TestCase
url = "http://api.rubyonrails.com/Foo.html"
email = "fantabulous@shiznadel.ic"
- assert_equal %(<p><a href="#{url}">#{url[0...7]}...</a><br /><a href="mailto:#{email}">#{email[0...7]}...</a><br /></p>), auto_link("<p>#{url}<br />#{email}<br /></p>") { |u| truncate(u, :length => 10) }
+ assert_equal %(<p><a href="#{url}">#{url[0...7]}...</a><br /><a href="mailto:#{email}">#{email[0...7]}...</a><br /></p>), auto_link("<p>#{url}<br />#{email}<br /></p>") { |_url| truncate(_url, :length => 10) }
end
def test_auto_link_with_block_with_html