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