# File test/xpath_test.rb, line 244 def test_abbreviated_attribute assert_equal 'a', XPath::first( @@doc, "a[@id='1']" ).name c = XPath::first( @@doc, "a/b/c[@id='4']" ) assert_equal 'c', c.name assert_equal '4', c.attributes['id'] assert_equal "11", XPath::first( @@doc, "descendant::f[@a='c']").attributes['id'] assert_equal "11", XPath::first(@@doc, "a/e/f[@a='c']").attributes["id"] assert_equal "11", XPath::first(@@doc, "a/e/*[@a='c']").attributes["id"] end