Sha256: 1506b3422dfde929733c245116ea0da4f096b4b47f5a07c42d4367a7b25b19ae

Contents?: true

Size: 547 Bytes

Versions: 12

Compression:

Stored size: 547 Bytes

Contents

require 'minitest/autorun'
require 'rack/session/abstract/id'

describe Rack::Session::Abstract::SessionHash do
  attr_reader :hash

  def setup
    super
    store = Class.new do
      def load_session(req)
        ["id", {foo: :bar, baz: :qux}]
      end
      def session_exists?(req)
        true
      end
    end
    @hash = Rack::Session::Abstract::SessionHash.new(store.new, nil)
  end

  it "returns keys" do
    assert_equal ["foo", "baz"], hash.keys
  end

  it "returns values" do
    assert_equal [:bar, :qux], hash.values
  end

end

Version data entries

12 entries across 12 versions & 5 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/rack-2.0.1/test/spec_session_abstract_session_hash.rb
autocompl-0.2.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/rack-2.0.1/test/spec_session_abstract_session_hash.rb
autocompl-0.2.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/rack-2.0.1/test/spec_session_abstract_session_hash.rb
autocompl-0.2.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/rack-2.0.1/test/spec_session_abstract_session_hash.rb
autocompl-0.1.2 test/dummy/vendor/bundle/ruby/2.3.0/gems/rack-2.0.1/test/spec_session_abstract_session_hash.rb
autocompl-0.1.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/rack-2.0.1/test/spec_session_abstract_session_hash.rb
autocompl-0.1.0 test/dummy/vendor/bundle/ruby/2.3.0/gems/rack-2.0.1/test/spec_session_abstract_session_hash.rb
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/rack-2.0.1/test/spec_session_abstract_session_hash.rb
abaci-0.3.0 vendor/bundle/gems/rack-2.0.1/test/spec_session_abstract_session_hash.rb
second_step-0.1.2 secondstep-notify-1.0.0-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/rack-2.0.1/test/spec_session_abstract_session_hash.rb
rack-2.0.1 test/spec_session_abstract_session_hash.rb
rack-2.0.0.rc1 test/spec_session_abstract_session_hash.rb