mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-21 21:40:48 +02:00

assert_select has been moved into the rails-dom-testing gem and is now based on Nokogiri. * Remove assert_tag and assert_xml_select * Quote CSS attribute selector values * Use decoded versions of HTML in assert_select. Nokogiri decodes elements prior to matching. * Add a test helper for entities such as ` ` for which it's difficult or confusing to include the decoded version directly in the assertion. * Assert directly on Atom feeds' XML namespace because it isn't selectable as an attribute
11 lines
155 B
Ruby
11 lines
155 B
Ruby
require 'htmlentities'
|
|
|
|
module HTMLEntityHelper
|
|
def entity(name)
|
|
HTMLEntities.new.decode("&#{name};")
|
|
end
|
|
|
|
def nbsp
|
|
entity('nbsp')
|
|
end
|
|
end
|