Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/rspec-support/lib/rspec/support/encoded_string.rb b/rspec-expectations/lib/rspec/expectations/encoded_string.rb
index 654a208..eeb0b16 100644
--- a/rspec-support/lib/rspec/support/encoded_string.rb
+++ b/rspec-expectations/lib/rspec/expectations/encoded_string.rb
@@ -1,5 +1,5 @@
module RSpec
- module Support
+ module Expectations
# @private
class EncodedString
@@ -33,6 +33,7 @@ module RSpec
private
if String.method_defined?(:encoding)
+
def matching_encoding(string)
string.encode(@encoding)
rescue Encoding::UndefinedConversionError, Encoding::InvalidByteSequenceError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.