mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-18 22:05:43 +08:00
12 lines
336 B
Ruby
Vendored
12 lines
336 B
Ruby
Vendored
# frozen_string_literal: true
|
|
include Rails::Dom::Testing::Assertions::DomAssertions
|
|
|
|
RSpec::Matchers.define :be_same_dom do |expected|
|
|
match do |actual|
|
|
assert_dom_equal(expected, actual)
|
|
rescue Minitest::Assertion
|
|
false
|
|
end
|
|
|
|
failure_message { |actual| "Expected DOM:\n#{expected}\nto be the same as:\n#{actual}" }
|
|
end
|