diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 18:01:48 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-28 18:01:48 -0300 |
commit | 523f98099d331908db6ab4c45f7657e61a8a4d5f (patch) | |
tree | 73c55e2d365e4b231c65855e189a11f387ca8234 /actionpack/lib/action_dispatch/testing/assertions | |
parent | ad2c21089e435527641d891a30ff8f695114071b (diff) | |
download | rails-523f98099d331908db6ab4c45f7657e61a8a4d5f.tar.gz rails-523f98099d331908db6ab4c45f7657e61a8a4d5f.tar.bz2 rails-523f98099d331908db6ab4c45f7657e61a8a4d5f.zip |
Remove more warnings on AP.
Diffstat (limited to 'actionpack/lib/action_dispatch/testing/assertions')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/selector.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb index f5ecb9a199..2b862fb7d6 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb @@ -67,7 +67,7 @@ module ActionDispatch arg = args.shift elsif arg == nil raise ArgumentError, "First argument is either selector or element to select, but nil found. Perhaps you called assert_select with an element that does not exist?" - elsif @selected + elsif defined?(@selected) && @selected matches = [] @selected.each do |selected| @@ -443,6 +443,7 @@ module ActionDispatch assert_block("") { true } # to count the assertion if block_given? && !([:remove, :show, :hide, :toggle].include? rjs_type) begin + @selected ||= nil in_scope, @selected = @selected, matches yield matches ensure |