I think you're right.
The only Loofah specific thing is the `text` method used here: https://github.com/kaspth/rails-dom-testing/blob/master/lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#L41

Here's the `text` method implementation: https://github.com/flavorjones/loofah/blob/master/lib/loofah/instance_methods.rb#L94-L103