Sha256: 2917faf984957abeb372ff873268ac8a8fa948c09448b6fe9a8cfc427a1eeb13

Contents?: true

Size: 469 Bytes

Versions: 4

Compression:

Stored size: 469 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe Lita::Store do
  it "has nil values by default" do
    expect(subject[:foo]).to be_nil
  end

  it "sets and gets values" do
    subject[:foo] = :bar

    expect(subject[:foo]).to eq(:bar)
  end

  it "allows a custom internal store" do
    subject = described_class.new(Hash.new { |h, k| h[k] = described_class.new })

    subject[:foo][:bar] = :baz

    expect(subject[:foo][:bar]).to eq(:baz)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rita-5.0.0.alpha.4 spec/lita/store_spec.rb
rita-5.0.0.alpha.3 spec/lita/store_spec.rb
rita-5.0.0.alpha.2 spec/lita/store_spec.rb
rita-5.0.0.alpha.1 spec/lita/store_spec.rb