@@ -309,13 +309,14 @@ def baz; end
309309
310310 # Make sure the enums are not parsed as normal classes
311311 enum = tree . nodes . first
312- assert_instance_of ( TEnum , enum . class )
312+ assert_instance_of ( TEnum , enum )
313313
314314 block = T . cast ( enum , TEnum ) . nodes . first
315315 assert_instance_of ( TEnumBlock , block )
316316
317317 values = T . cast ( block , TEnumBlock ) . nodes
318- assert ( values . all? { |value | value . is_a? ( Const ) } )
318+ assert_equal ( 3 , values . size )
319+ assert_equal ( 3 , values . grep ( TEnumValue ) . size )
319320
320321 assert_equal ( rbi , tree . string )
321322 end
@@ -335,7 +336,13 @@ def baz; end
335336
336337 # Make sure the enums are not parsed as normal classes
337338 enum = tree . nodes . first
338- assert_equal ( TEnum , enum . class )
339+ assert_instance_of ( TEnum , enum )
340+
341+ block = T . cast ( enum , TEnum ) . nodes . first
342+ assert_instance_of ( TEnumBlock , block )
343+
344+ value = T . cast ( block , TEnumBlock ) . nodes . first
345+ assert_instance_of ( TEnumValue , value )
339346
340347 assert_equal ( rbi , tree . string )
341348 end
0 commit comments