aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/assertions.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-01-05 23:31:46 -0800
committerJosé Valim <jose.valim@gmail.com>2012-01-05 23:31:46 -0800
commit75a630edf34d09bc57f3088136d418850abc4641 (patch)
treeb54d8b37ddc7c91d58054923a5212057ce6d9393 /activesupport/lib/active_support/testing/assertions.rb
parente09c3c783433e01b11ee4ea12980340cc325472e (diff)
parent4311fc45dcfaee61ea6bfbd1631d6672b46f787b (diff)
downloadrails-75a630edf34d09bc57f3088136d418850abc4641.tar.gz
rails-75a630edf34d09bc57f3088136d418850abc4641.tar.bz2
rails-75a630edf34d09bc57f3088136d418850abc4641.zip
Merge pull request #4340 from rafaelfranca/patch-1
Remove more Array.wrap calls
Diffstat (limited to 'activesupport/lib/active_support/testing/assertions.rb')
-rw-r--r--activesupport/lib/active_support/testing/assertions.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/testing/assertions.rb b/activesupport/lib/active_support/testing/assertions.rb
index 4e1a58a801..d84595fa8f 100644
--- a/activesupport/lib/active_support/testing/assertions.rb
+++ b/activesupport/lib/active_support/testing/assertions.rb
@@ -1,4 +1,3 @@
-require 'active_support/core_ext/array/wrap'
require 'active_support/core_ext/object/blank'
module ActiveSupport
@@ -45,7 +44,7 @@ module ActiveSupport
# post :delete, :id => ...
# end
def assert_difference(expression, difference = 1, message = nil, &block)
- expressions = Array.wrap expression
+ expressions = Array(expression)
exps = expressions.map { |e|
e.respond_to?(:call) ? e : lambda { eval(e, block.binding) }