Sha256: 7913dc3253662203f60f7ebbffddf383b96cf44324f91716d29952a089b6ef9d
Contents?: true
Size: 843 Bytes
Versions: 27
Compression:
Stored size: 843 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe Split::Persistence::SessionAdapter do let(:context) { double(:session => {}) } subject { Split::Persistence::SessionAdapter.new(context) } describe "#[] and #[]=" do it "should set and return the value for given key" do subject["my_key"] = "my_value" expect(subject["my_key"]).to eq("my_value") end end describe "#delete" do it "should delete the given key" do subject["my_key"] = "my_value" subject.delete("my_key") expect(subject["my_key"]).to be_nil end end describe "#keys" do it "should return an array of the session's stored keys" do subject["my_key"] = "my_value" subject["my_second_key"] = "my_second_value" expect(subject.keys).to match(["my_key", "my_second_key"]) end end end
Version data entries
27 entries across 27 versions & 2 rubygems