diff options
author | Timm <kaspth@gmail.com> | 2013-07-20 12:25:13 +0200 |
---|---|---|
committer | Timm <kaspth@gmail.com> | 2014-06-15 23:40:56 +0200 |
commit | 328512ea5f30dd2e408bfb002fab9ed0e1b391ce (patch) | |
tree | 5a775bf1652908375cd881495e4f0e6b98cf1e97 /actionpack | |
parent | a38c759819012470638005795d5affd6bf305ebc (diff) | |
download | rails-328512ea5f30dd2e408bfb002fab9ed0e1b391ce.tar.gz rails-328512ea5f30dd2e408bfb002fab9ed0e1b391ce.tar.bz2 rails-328512ea5f30dd2e408bfb002fab9ed0e1b391ce.zip |
Removed argument and root variable in assert_select proc.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/testing/assertions/selector.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/testing/assertions/selector.rb b/actionpack/lib/action_dispatch/testing/assertions/selector.rb index 5ce541e178..c63dd1ca8a 100644 --- a/actionpack/lib/action_dispatch/testing/assertions/selector.rb +++ b/actionpack/lib/action_dispatch/testing/assertions/selector.rb @@ -166,10 +166,8 @@ module ActionDispatch def assert_select(*args, &block) @selected ||= nil - parser = HTMLSelector.new(@selected, args, Proc.new do |_| - root = Loofah.fragment('') - root.add_child @selected - root + parser = HTMLSelector.new(@selected, args, Proc.new do + Loofah.fragment('').tap { |fragment| fragment.add_child @selected } end) # Start with optional element followed by mandatory selector. |