blob: b379f35c1c162af380b3652d8114e07ef718a7c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
require_relative '../../../spec_helper'
require 'openssl'
describe "OpenSSL::Digest#name" do
it "returns the name of digest" do
OpenSSL::Digest.new('SHA1').name.should == 'SHA1'
end
it "converts the name to the internal representation of OpenSSL" do
OpenSSL::Digest.new('sha1').name.should == 'SHA1'
end
it "works on subclasses too" do
OpenSSL::Digest::SHA1.new.name.should == 'SHA1'
end
end
|