summaryrefslogtreecommitdiff
path: root/spec/ruby/library/digest/sha256/length_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/digest/sha256/length_spec.rb')
-rw-r--r--spec/ruby/library/digest/sha256/length_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/ruby/library/digest/sha256/length_spec.rb b/spec/ruby/library/digest/sha256/length_spec.rb
new file mode 100644
index 0000000000..fc3db6548e
--- /dev/null
+++ b/spec/ruby/library/digest/sha256/length_spec.rb
@@ -0,0 +1,11 @@
+require_relative '../../../spec_helper'
+require_relative 'shared/constants'
+
+describe "Digest::SHA256#length" do
+ it "returns the length of the digest" do
+ cur_digest = Digest::SHA256.new
+ cur_digest.length.should == SHA256Constants::BlankDigest.size
+ cur_digest << SHA256Constants::Contents
+ cur_digest.length.should == SHA256Constants::Digest.size
+ end
+end