Class: ShibRack::TestHandler

Inherits:
Handler
  • Object
show all
Defined in:
lib/shib_rack/test_handler.rb

Overview

Handler for headless browser testing, which injects configured attributes into the Rack env before invoking ShibRack::Handler.

Class Attribute Summary collapse

Attributes inherited from Handler

#error_handler

Instance Method Summary collapse

Methods inherited from Handler

#handle, #initialize

Constructor Details

This class inherits a constructor from ShibRack::Handler

Class Attribute Details

.attributesObject

Returns the value of attribute attributes.



8
9
10
# File 'lib/shib_rack/test_handler.rb', line 8

def attributes
  @attributes
end

Instance Method Details

#call(env) ⇒ Object



11
12
13
14
# File 'lib/shib_rack/test_handler.rb', line 11

def call(env)
  attrs = TestHandler.attributes || raise('No user attributes were set')
  super(env.merge(attrs))
end