summaryrefslogtreecommitdiff
path: root/spec/support/matchers/be_utf8.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/matchers/be_utf8.rb')
-rw-r--r--spec/support/matchers/be_utf8.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/support/matchers/be_utf8.rb b/spec/support/matchers/be_utf8.rb
index ea806352422..4fa55539a49 100644
--- a/spec/support/matchers/be_utf8.rb
+++ b/spec/support/matchers/be_utf8.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
RSpec::Matchers.define :be_utf8 do |_|
match do |actual|
actual.is_a?(String) && actual.encoding == Encoding.find('UTF-8')