Sha256: 35507d6de0b1dafe79c4510fe7254d0f43a6b72fc75d42986e1a2f7549f39fe9
Contents?: true
Size: 794 Bytes
Versions: 4
Compression:
Stored size: 794 Bytes
Contents
require "spec_helper" describe Split::Persistence::SessionAdapter do let(:context) { mock(: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" subject["my_key"].should eq("my_value") end end describe "#delete" do it "should delete the given key" do subject["my_key"] = "my_value" subject.delete("my_key") subject["my_key"].should 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" subject.keys.should =~ ["my_key", "my_second_key"] end end end
Version data entries
4 entries across 4 versions & 1 rubygems