diff options
author | Timm <kaspth@gmail.com> | 2013-08-16 20:53:55 +0200 |
---|---|---|
committer | Timm <kaspth@gmail.com> | 2014-06-16 21:04:09 +0200 |
commit | 4b55c0aa2e923e6102c9f80e12bbfde4431a7412 (patch) | |
tree | 6c5958319bb217bcc5d590119c041ec5773e5622 | |
parent | cabef1415ad18063090f8fb2a48291355e536b0c (diff) | |
download | rails-4b55c0aa2e923e6102c9f80e12bbfde4431a7412.tar.gz rails-4b55c0aa2e923e6102c9f80e12bbfde4431a7412.tar.bz2 rails-4b55c0aa2e923e6102c9f80e12bbfde4431a7412.zip |
Moved: initial assignment of @selector_is_second_argument is now in initialize.
-rw-r--r-- | actionview/lib/action_view/testing/assertions/selector.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/testing/assertions/selector.rb b/actionview/lib/action_view/testing/assertions/selector.rb index bbdb21f4b0..73f31c2127 100644 --- a/actionview/lib/action_view/testing/assertions/selector.rb +++ b/actionview/lib/action_view/testing/assertions/selector.rb @@ -311,6 +311,7 @@ module ActionView def initialize(selected, page, args) # Start with possible optional element followed by mandatory selector. + @selector_is_second_argument = false @root = determine_root_from(args.first, page, selected) @selector = extract_selector(args) @@ -354,7 +355,6 @@ module ActionView end def determine_root_from(root_or_selector, page, previous_selection = nil) - @selector_is_second_argument = false if root_or_selector == 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 root_or_selector.respond_to?(:css) |