@@ -595,31 +595,27 @@ def test_it_parses_whole_definition_with_descriptions
595
595
596
596
assert_equal 6 , document . definitions . size
597
597
598
- schema_definition = document . definitions . shift
598
+ schema_definition , directive_definition , enum_type_definition , object_type_definition , input_object_type_definition , interface_type_definition = document . definitions
599
+
599
600
assert_equal GraphQL ::Language ::Nodes ::SchemaDefinition , schema_definition . class
600
601
601
- directive_definition = document . definitions . shift
602
602
assert_equal GraphQL ::Language ::Nodes ::DirectiveDefinition , directive_definition . class
603
603
assert_equal 'This is a directive' , directive_definition . description
604
604
605
- enum_type_definition = document . definitions . shift
606
605
assert_equal GraphQL ::Language ::Nodes ::EnumTypeDefinition , enum_type_definition . class
607
606
assert_equal "Multiline comment\n \n With an enum" , enum_type_definition . description
608
607
609
608
assert_nil enum_type_definition . values [ 0 ] . description
610
609
assert_equal 'Not a creative color' , enum_type_definition . values [ 1 ] . description
611
610
612
- object_type_definition = document . definitions . shift
613
611
assert_equal GraphQL ::Language ::Nodes ::ObjectTypeDefinition , object_type_definition . class
614
612
assert_equal 'Comment without preceding space' , object_type_definition . description
615
613
assert_equal 'And a field to boot' , object_type_definition . fields [ 0 ] . description
616
614
617
- input_object_type_definition = document . definitions . shift
618
615
assert_equal GraphQL ::Language ::Nodes ::InputObjectTypeDefinition , input_object_type_definition . class
619
616
assert_equal 'Comment for input object types' , input_object_type_definition . description
620
617
assert_equal 'Color of the car' , input_object_type_definition . fields [ 0 ] . description
621
618
622
- interface_type_definition = document . definitions . shift
623
619
assert_equal GraphQL ::Language ::Nodes ::InterfaceTypeDefinition , interface_type_definition . class
624
620
assert_equal 'Comment for interface definitions' , interface_type_definition . description
625
621
assert_equal 'Amount of wheels' , interface_type_definition . fields [ 0 ] . description
0 commit comments