summaryrefslogtreecommitdiff
path: root/test/rexml/test_preceding_sibling.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-27 13:10:55 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-27 13:10:55 +0000
commitba3d2f4ac20bec871fe96a393d923d0cbb0fd96a (patch)
tree897a0308607db1dad21eef1fee86b351e93ebfa5 /test/rexml/test_preceding_sibling.rb
parent313fa180333a1eb4d1fa1542930e83f8d77e6b2d (diff)
* test/rexml/test_contrib.rb: Indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rexml/test_preceding_sibling.rb')
-rw-r--r--test/rexml/test_preceding_sibling.rb56
1 files changed, 28 insertions, 28 deletions
diff --git a/test/rexml/test_preceding_sibling.rb b/test/rexml/test_preceding_sibling.rb
index c05eedb001..54fdd5b22e 100644
--- a/test/rexml/test_preceding_sibling.rb
+++ b/test/rexml/test_preceding_sibling.rb
@@ -3,38 +3,38 @@ require 'test/unit'
require 'rexml/document'
module REXMLTests
-# daz - for report by Dan Kohn in:
-# http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/156328
-class XPathTesterDd < Test::Unit::TestCase
- include REXML
+ # daz - for report by Dan Kohn in:
+ # http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/156328
+ class XPathTesterDd < Test::Unit::TestCase
+ include REXML
- def setup
- @@docDd = Document.new(<<-EOS, :ignore_whitespace_nodes => :all)
- <a>
- <b x='ab01A'>
- <c y='abc01A'>Success</c>
- </b>
- <b x='ab02A' y='ab02B'>
- <c>abc02C</c>
- </b>
- </a>
- EOS
- end
+ def setup
+ @@docDd = Document.new(<<-EOS, :ignore_whitespace_nodes => :all)
+ <a>
+ <b x='ab01A'>
+ <c y='abc01A'>Success</c>
+ </b>
+ <b x='ab02A' y='ab02B'>
+ <c>abc02C</c>
+ </b>
+ </a>
+ EOS
+ end
- def test_Dd_preceding_sibling_children
- arr = []
- XPath.each(@@docDd, "//b[@x='ab02A']/preceding-sibling::b/child::*") do |cell|
- arr << cell.texts.join
+ def test_Dd_preceding_sibling_children
+ arr = []
+ XPath.each(@@docDd, "//b[@x='ab02A']/preceding-sibling::b/child::*") do |cell|
+ arr << cell.texts.join
+ end
+ assert_equal( 'Success', arr.join )
end
- assert_equal( 'Success', arr.join )
- end
- def test_Dd_preceding_sibling_all
- arr = []
- XPath.each(@@docDd, "//b[@x='ab02A']/preceding-sibling::*") do |cell|
- arr << cell.to_s
+ def test_Dd_preceding_sibling_all
+ arr = []
+ XPath.each(@@docDd, "//b[@x='ab02A']/preceding-sibling::*") do |cell|
+ arr << cell.to_s
+ end
+ assert_equal( "<b x='ab01A'><c y='abc01A'>Success</c></b>", arr.join )
end
- assert_equal( "<b x='ab01A'><c y='abc01A'>Success</c></b>", arr.join )
end
end
-end