Class: GraphqlRails::RSpecControllerHelpers::Request
- Inherits:
-
Controller::Request
- Object
- Controller::Request
- GraphqlRails::RSpecControllerHelpers::Request
- Defined in:
- lib/graphql_rails/rspec_controller_helpers.rb
Overview
controller request object more suitable for testing
Instance Attribute Summary collapse
-
#action_name ⇒ Object
readonly
Returns the value of attribute action_name.
-
#controller ⇒ Object
readonly
Returns the value of attribute controller.
Attributes inherited from Controller::Request
#context, #errors, #lookahead, #object_to_return
Instance Method Summary collapse
-
#initialize(params, context, controller: nil, action_name: nil) ⇒ Request
constructor
A new instance of Request.
Methods inherited from Controller::Request
#no_object_to_return?, #params
Constructor Details
#initialize(params, context, controller: nil, action_name: nil) ⇒ Request
Returns a new instance of Request.
107 108 109 110 111 112 113 |
# File 'lib/graphql_rails/rspec_controller_helpers.rb', line 107 def initialize(params, context, controller: nil, action_name: nil) inputs = params || {} inputs = inputs.merge(lookahead: ::GraphQL::Execution::Lookahead::NullLookahead.new) @controller = controller @action_name = action_name super(nil, inputs, context) end |
Instance Attribute Details
#action_name ⇒ Object (readonly)
Returns the value of attribute action_name.
105 106 107 |
# File 'lib/graphql_rails/rspec_controller_helpers.rb', line 105 def action_name @action_name end |
#controller ⇒ Object (readonly)
Returns the value of attribute controller.
105 106 107 |
# File 'lib/graphql_rails/rspec_controller_helpers.rb', line 105 def controller @controller end |