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

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

RSpec::Matchers.define :be_utf8 do |_|
  match do |actual|
    actual.is_a?(String) && actual.encoding == Encoding.find('UTF-8')
  end

  description do
    "be a String with encoding UTF-8"
  end
end