Sha256: 1d129338205dda23d7f4417d8c5a9059d41ada75d4f9a62b34e59a791a00ca4a

Contents?: true

Size: 604 Bytes

Versions: 9

Compression:

Stored size: 604 Bytes

Contents

require File.expand_path('../shared/constants', __FILE__)

describe "Digest::SHA256#to_s" do

  it "returns a hexdigest" do
    cur_digest = Digest::SHA256.new
    cur_digest.to_s.should == SHA256Constants::BlankHexdigest
  end

  it "does not change the internal state" do
    cur_digest = Digest::SHA256.new
    cur_digest.to_s.should == SHA256Constants::BlankHexdigest
    cur_digest.to_s.should == SHA256Constants::BlankHexdigest

    cur_digest << SHA256Constants::Contents
    cur_digest.to_s.should == SHA256Constants::Hexdigest
    cur_digest.to_s.should == SHA256Constants::Hexdigest
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubysl-digest-2.1 spec/sha256/to_s_spec.rb
rubysl-digest-1.2.0 spec/sha256/to_s_spec.rb
rubysl-digest-1.1.0 spec/sha256/to_s_spec.rb
rubysl-digest-2.0.8 spec/sha256/to_s_spec.rb
rubysl-digest-2.0.7 spec/sha256/to_s_spec.rb
rubysl-digest-1.0.1 spec/sha256/to_s_spec.rb
rubysl-digest-2.0.3 spec/sha256/to_s_spec.rb
rubysl-digest-1.0.0 spec/sha256/to_s_spec.rb
rubysl-digest-2.0.2 spec/sha256/to_s_spec.rb