Sha256: 8b86eadec27612a403e9851714723671cdcc469413d34ca83eeb59e87d9d3b17

Contents?: true

Size: 479 Bytes

Versions: 2

Compression:

Stored size: 479 Bytes

Contents

require 'spec_helper'
require 'opal-jquery/local_storage'

describe LocalStorage do
  before { subject.clear }

  it "returns nil for undefined values" do
    expect(subject['foo']).to be_nil
  end

  it "should be able to create items" do
    subject['foo'] = 'Ford Prefect'
    expect(subject['foo']).to eq('Ford Prefect')
  end

  it "should be able to delete items" do
    subject['name'] = 'Arthur'
    subject.delete 'name'

    expect(subject['name']).to be_nil
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
opal-jquery-0.3.0.beta1 spec/local_storage_spec.rb
opal-jquery-0.2.0 spec/local_storage_spec.rb