aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2012-01-29 11:30:37 -0800
committerSantiago Pastorino <santiago@wyeworks.com>2012-01-29 11:30:37 -0800
commitdfa0c36204beb1b519962a6a49a1ebbed91015dd (patch)
tree2794ed0b8dd33458d2509ddd974519df9f561c8b /actionpack/lib/action_dispatch
parent677e06c20f6df6c44f44af9ba95390558e67a9bc (diff)
parentbf928bc7329640969917eb680da4de959b7156b7 (diff)
downloadrails-dfa0c36204beb1b519962a6a49a1ebbed91015dd.tar.gz
rails-dfa0c36204beb1b519962a6a49a1ebbed91015dd.tar.bz2
rails-dfa0c36204beb1b519962a6a49a1ebbed91015dd.zip
Merge pull request #4744 from ndbroadbent/replace_for_loops_with_enumerables
Replaced all 'for' loops with Enumerable#each
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/testing/assertions/selector.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
index 4d963803e6..33796008bd 100644
--- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb
+++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb
@@ -417,8 +417,8 @@ module ActionDispatch
deliveries = ActionMailer::Base.deliveries
assert !deliveries.empty?, "No e-mail in delivery list"
- for delivery in deliveries
- for part in (delivery.parts.empty? ? [delivery] : delivery.parts)
+ deliveries.each do |delivery|
+ (delivery.parts.empty? ? [delivery] : delivery.parts).each do |part|
if part["Content-Type"].to_s =~ /^text\/html\W/
root = HTML::Document.new(part.body.to_s).root
assert_select root, ":root", &block