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