Browse files

@selected may not be defined here, avoid warning.

  • Loading branch information...
1 parent 8ee27af commit adcc5e11fe5edd2883b6ec4d08ab72180a973155 @miloops miloops committed Sep 28, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/testing/assertions/selector.rb
@@ -197,7 +197,7 @@ def assert_select(*args, &block)
# This usually happens when passing a node/element that
# happens to be 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
root =
root.children.concat @selected

0 comments on commit adcc5e1

Please sign in to comment.