Class: GraphQL::Autotest::Report
- Inherits:
-
Struct
- Object
- Struct
- GraphQL::Autotest::Report
- Defined in:
- lib/graphql/autotest/report.rb
Defined Under Namespace
Classes: Execution
Instance Attribute Summary collapse
-
#executions ⇒ Object
Returns the value of attribute executions.
Instance Method Summary collapse
Instance Attribute Details
#executions ⇒ Object
Returns the value of attribute executions
3 4 5 |
# File 'lib/graphql/autotest/report.rb', line 3 def executions @executions end |
Instance Method Details
#error? ⇒ Boolean
14 15 16 |
# File 'lib/graphql/autotest/report.rb', line 14 def error? !errored_executions.empty? end |
#errored_executions ⇒ Object
18 19 20 |
# File 'lib/graphql/autotest/report.rb', line 18 def errored_executions executions.select { |e| e.result['errors'] } end |
#raise_if_error! ⇒ Object
22 23 24 |
# File 'lib/graphql/autotest/report.rb', line 22 def raise_if_error! raise errored_executions.map(&:to_error_message).join("\n\n") if error? end |