Namespace
Methods
- T
Instance Public methods
Source: show
# File rails/activesupport/test/core_ext/module_test.rb, line 103 def test_as_load_path assert_equal 'yz/zy', Yz::Zy.as_load_path assert_equal 'yz', Yz.as_load_path end
Source: show
# File rails/activesupport/test/core_ext/module_test.rb, line 73 def test_delegation_down_hierarchy david = Someone.new("David", Somewhere.new("Paulina", "Chicago")) assert_equal "CHICAGO", david.upcase end
Source: show
# File rails/activesupport/test/core_ext/module_test.rb, line 78 def test_delegation_to_instance_variable david = Name.new("David", "Hansson") assert_equal "DAVID HANSSON", david.upcase end
Source: show
# File rails/activesupport/test/core_ext/module_test.rb, line 67 def test_delegation_to_methods david = Someone.new("David", Somewhere.new("Paulina", "Chicago")) assert_equal "Paulina", david.street assert_equal "Chicago", david.city end
Source: show
# File rails/activesupport/test/core_ext/module_test.rb, line 60 def test_included_in_classes assert One.included_in_classes.include?(Ab) assert One.included_in_classes.include?(Xy::Bc) assert One.included_in_classes.include?(Yz::Zy::Cd) assert !One.included_in_classes.include?(De) end
Source: show
# File rails/activesupport/test/core_ext/module_test.rb, line 99 def test_local_constants assert_equal %w(Constant1 Constant3), Ab.local_constants.sort end
Source: show
# File rails/activesupport/test/core_ext/module_test.rb, line 83 def test_missing_delegation_target assert_raises(ArgumentError) { eval($nowhere) } assert_raises(ArgumentError) { eval($noplace) } end
Source: show
# File rails/activesupport/test/core_ext/module_test.rb, line 88 def test_parent assert_equal Yz::Zy, Yz::Zy::Cd.parent assert_equal Yz, Yz::Zy.parent assert_equal Object, Yz.parent end
Source: show
# File rails/activesupport/test/core_ext/module_test.rb, line 94 def test_parents assert_equal [Yz::Zy, Yz, Object], Yz::Zy::Cd.parents assert_equal [Yz, Object], Yz::Zy.parents end