2019-07-25 01:27:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-06-28 11:44:37 -04:00
|
|
|
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
|