diff --git a/spec/dotenv_spec.rb b/spec/dotenv_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/dotenv_spec.rb
+++ b/spec/dotenv_spec.rb
@@ -141,7 +141,7 @@ describe Dotenv do
 
     it "fixture file has UTF-8 BOM" do
       contents = File.open(subject, "rb", &:read).force_encoding("UTF-8")
-      expect(contents).to start_with("\xEF\xBB\xBF")
+      expect(contents).to start_with("\xEF\xBB\xBF".force_encoding("UTF-8"))
     end
   end
Fix a failure spec at Ruby <I>

By default, Strings with non-ASCII 8bit character in Ruby <I> are tagged with the "ASCII-8BIT" encoding.