Sha256: 2d639d2386ffa0500bee54bec7e93c8ad8f62d595ef5fe9bd0aa7ce84a86af45

Contents?: true

Size: 446 Bytes

Versions: 3

Compression:

Stored size: 446 Bytes

Contents

require 'base64'

describe "Base64#encode64" do
  it "returns the Base64-encoded version of the given string" do
    Base64.encode64("Now is the time for all good coders\nto learn Ruby").should ==
      "Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4g\nUnVieQ==\n"
  end

  it "returns the Base64-encoded version of the given string" do
    Base64.encode64('Send reinforcements').should == "U2VuZCByZWluZm9yY2VtZW50cw==\n"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubysl-base64-1.0.1 spec/encode64_spec.rb
rubysl-base64-1.0.0 spec/encode64_spec.rb
rubysl-base64-2.0.0 spec/encode64_spec.rb