Sha256: 8ba84f2ec6dc12d59e1af57b7ece9a963c5e6f760bbfa586ea1943d1a9fc281e

Contents?: true

Size: 399 Bytes

Versions: 2

Compression:

Stored size: 399 Bytes

Contents

require "spec_helper"

describe Parsel do
  let(:key) { "my secret key" }

  it "encrypts data" do
    Parsel.encrypt(key, "hello").should_not eql("hello")
  end

  it "decrypts data" do
    encrypted = Parsel.encrypt(key, "hello")
    Parsel.decrypt(key, encrypted).should eql("hello")
  end

  it "returns false when decryption fails" do
    Parsel.decrypt("abc", "123").should be_false
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
parsel-0.1.1 spec/parsel_spec.rb
parsel-0.1.0 spec/parsel_spec.rb