Sha256: 96fd170ca61b84ee76237a1176fa57be13e88c41b8ded6f6e47311464e9ecf69

Contents?: true

Size: 445 Bytes

Versions: 4

Compression:

Stored size: 445 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Cookie, '#decrypt' do
  subject { object.decrypt(box) }

  let(:object) { described_class.new(name, cipher) }
  let(:name)   { double('name') }
  let(:cipher) { double('cipher') }
  let(:box)    { double('box') }
  let(:value)  { double('value') }

  before do
    expect(box).to receive(:decrypt).with(cipher).and_return(value)
  end

  it { should eql(described_class.new(name, value)) }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
majoun-0.0.4 spec/unit/cookie/decrypt_spec.rb
majoun-0.0.3 spec/unit/cookie/decrypt_spec.rb
majoun-0.0.2 spec/unit/cookie/decrypt_spec.rb
majoun-0.0.1 spec/unit/cookie/decrypt_spec.rb