Class: RubyIndexer::GlobalVariableTest

Inherits:
TestCase
  • Object
show all
Defined in:
lib/ruby_indexer/test/global_variable_test.rb

Instance Method Summary collapse

Methods inherited from TestCase

#setup, #teardown

Instance Method Details

#test_global_variable_and_writeObject



8
9
10
11
12
13
14
# File 'lib/ruby_indexer/test/global_variable_test.rb', line 8

def test_global_variable_and_write
  index("    $foo &&= 1\n  RUBY\n\n  assert_entry(\"$foo\", Entry::GlobalVariable, \"/fake/path/foo.rb:0-0:0-4\")\nend\n")

#test_global_variable_operator_writeObject



16
17
18
19
20
21
22
# File 'lib/ruby_indexer/test/global_variable_test.rb', line 16

def test_global_variable_operator_write
  index("    $foo += 1\n  RUBY\n\n  assert_entry(\"$foo\", Entry::GlobalVariable, \"/fake/path/foo.rb:0-0:0-4\")\nend\n")

#test_global_variable_or_writeObject



24
25
26
27
28
29
30
# File 'lib/ruby_indexer/test/global_variable_test.rb', line 24

def test_global_variable_or_write
  index("    $foo ||= 1\n  RUBY\n\n  assert_entry(\"$foo\", Entry::GlobalVariable, \"/fake/path/foo.rb:0-0:0-4\")\nend\n")

#test_global_variable_target_nodeObject



32
33
34
35
36
37
38
39
# File 'lib/ruby_indexer/test/global_variable_test.rb', line 32

def test_global_variable_target_node
  index("    $foo, $bar = 1\n  RUBY\n\n  assert_entry(\"$foo\", Entry::GlobalVariable, \"/fake/path/foo.rb:0-0:0-4\")\n  assert_entry(\"$bar\", Entry::GlobalVariable, \"/fake/path/foo.rb:0-6:0-10\")\nend\n")

#test_global_variable_writeObject



41
42
43
44
45
46
47
# File 'lib/ruby_indexer/test/global_variable_test.rb', line 41

def test_global_variable_write
  index("    $foo = 1\n  RUBY\n\n  assert_entry(\"$foo\", Entry::GlobalVariable, \"/fake/path/foo.rb:0-0:0-4\")\nend\n")