summaryrefslogtreecommitdiff
path: root/spec/ruby/library/digest/sha256/file_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/digest/sha256/file_spec.rb')
-rw-r--r--spec/ruby/library/digest/sha256/file_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/ruby/library/digest/sha256/file_spec.rb b/spec/ruby/library/digest/sha256/file_spec.rb
index 6103971b5a..8cbc5a2755 100644
--- a/spec/ruby/library/digest/sha256/file_spec.rb
+++ b/spec/ruby/library/digest/sha256/file_spec.rb
@@ -22,6 +22,10 @@ describe "Digest::SHA256.file" do
Digest::SHA256.file(@file).digest.should == SHA256Constants::Digest
end
+ it "can be used with frozen-string-literal" do
+ ruby_exe("require 'digest'; puts Digest::SHA256.file(#{@file.inspect}).digest.inspect", options: "--enable=frozen-string-literal").chomp.should == SHA256Constants::Digest.inspect
+ end
+
it "calls #to_str on an object and returns the Digest::SHA256 with the result" do
obj = mock("to_str")
obj.should_receive(:to_str).and_return(@file)