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