Class: GraphqlRails::RSpecControllerHelpers::FakeContext
- Inherits:
-
Object
- Object
- GraphqlRails::RSpecControllerHelpers::FakeContext
- Extended by:
- Forwardable
- Defined in:
- lib/graphql_rails/rspec_controller_helpers.rb
Overview
instance which has similar behavior as
Instance Attribute Summary collapse
-
#schema ⇒ Object
readonly
Returns the value of attribute schema.
Instance Method Summary collapse
- #add_error(error) ⇒ Object
-
#initialize(values:, schema:) ⇒ FakeContext
constructor
A new instance of FakeContext.
Constructor Details
#initialize(values:, schema:) ⇒ FakeContext
Returns a new instance of FakeContext.
70 71 72 73 74 |
# File 'lib/graphql_rails/rspec_controller_helpers.rb', line 70 def initialize(values:, schema:) @errors = [] @provided_values = values @schema = schema end |
Instance Attribute Details
#schema ⇒ Object (readonly)
Returns the value of attribute schema.
66 67 68 |
# File 'lib/graphql_rails/rspec_controller_helpers.rb', line 66 def schema @schema end |
Instance Method Details
#add_error(error) ⇒ Object
76 77 78 |
# File 'lib/graphql_rails/rspec_controller_helpers.rb', line 76 def add_error(error) @errors << error end |