class RubyIndexer::RBSIndexerTest

def test_index_global_declaration

def test_index_global_declaration
  entries = @index["$DEBUG"] #: as Array[Entry::GlobalVariable]
  refute_nil(entries)
  assert_equal(1, entries.length)
  entry = entries.first #: as Entry::GlobalVariable
  assert_instance_of(Entry::GlobalVariable, entry)
  assert_equal("$DEBUG", entry.name)
  assert_match(%r{/gems/rbs-.*/core/global_variables.rbs}, entry.file_path)
  assert_operator(entry.location.start_column, :<, entry.location.end_column)
  assert_equal(entry.location.start_line, entry.location.end_line)
end