Sha256: 1339ad65b952be3bae20717661e158ea6c9a6af2cc31ab4ca3133c6e541445fa

Contents?: true

Size: 576 Bytes

Versions: 29

Compression:

Stored size: 576 Bytes

Contents

module Shoulda
  module Matchers
    module ActionController
      # @private
      class SessionStore
        attr_accessor :controller

        def name
          'session'
        end

        def has_key?(key)
          session.key?(key)
        end

        def has_value?(expected_value)
          session.values.any? do |actual_value|
            expected_value === actual_value
          end
        end

        def empty?
          session.empty?
        end

        private

        def session
          controller.session
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
shoulda-matchers-6.4.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-6.3.1 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-6.3.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-6.2.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-6.1.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-6.0.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-5.3.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-5.2.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-5.1.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-5.0.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-5.0.0.rc1 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-4.5.1 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-4.5.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-4.4.1 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-4.4.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-4.3.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-4.2.0 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-4.1.2 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-4.1.1 lib/shoulda/matchers/action_controller/session_store.rb
shoulda-matchers-4.1.0 lib/shoulda/matchers/action_controller/session_store.rb