diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-28 15:29:40 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-09-28 15:29:40 -0300 |
commit | adcc5e11fe5edd2883b6ec4d08ab72180a973155 (patch) | |
tree | 66d417a68de7485c3f67c6b7558183dc7a42239d /actionpack/lib/action_dispatch | |
parent | 8ee27afd064bccfc63b21f126109a9b20ce72bd5 (diff) | |
download | rails-adcc5e11fe5edd2883b6ec4d08ab72180a973155.tar.gz rails-adcc5e11fe5edd2883b6ec4d08ab72180a973155.tar.bz2 rails-adcc5e11fe5edd2883b6ec4d08ab72180a973155.zip |
@selected may not be defined here, avoid warning.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/selector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb index 353be10d20..9ae4f65db9 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb @@ -197,7 +197,7 @@ module ActionDispatch # 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 = HTML::Node.new(nil) root.children.concat @selected else |