mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@07164da
This commit is contained in:
parent
7429841ab6
commit
126fd5f15c
38 changed files with 733 additions and 44 deletions
19
spec/ruby/library/digest/instance/new_spec.rb
Normal file
19
spec/ruby/library/digest/instance/new_spec.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
require_relative '../../../spec_helper'
|
||||
require 'digest'
|
||||
require_relative '../md5/shared/constants'
|
||||
|
||||
describe "Digest::Instance#new" do
|
||||
it "returns a copy of the digest instance" do
|
||||
digest = Digest::MD5.new
|
||||
copy = digest.new
|
||||
copy.should_not.equal?(digest)
|
||||
end
|
||||
|
||||
it "calls reset" do
|
||||
digest = Digest::MD5.new
|
||||
digest << "test"
|
||||
digest.hexdigest.should != MD5Constants::BlankHexdigest
|
||||
copy = digest.new
|
||||
copy.hexdigest.should == MD5Constants::BlankHexdigest
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue