Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sourcepos_matchers.rb « matchers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 903fe2bd201caa74770f4c6206934e2cef19a794 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

# remove data-sourcepos from compare
RSpec::Matchers.define :eq_no_sourcepos do |expected|
  include MarkdownHelpers

  match do |actual|
    remove_sourcepos(actual) == expected
  end

  description do
    "equal ignoring sourcepos #{expected}"
  end
end