diff options
Diffstat (limited to 'spec/ruby/library/rexml/element')
3 files changed, 12 insertions, 12 deletions
diff --git a/spec/ruby/library/rexml/element/each_element_with_attribute_spec.rb b/spec/ruby/library/rexml/element/each_element_with_attribute_spec.rb index f2d779e577..dcc6dbbf17 100644 --- a/spec/ruby/library/rexml/element/each_element_with_attribute_spec.rb +++ b/spec/ruby/library/rexml/element/each_element_with_attribute_spec.rb @@ -12,23 +12,23 @@ ruby_version_is ''...'3.0' do @son.attributes["name"] = "Fred" @document.root << @father @document.root << @son - @childs = [] + @children = [] end - it "returns childs with attribute" do - @document.each_element_with_attribute("name") { |elem| @childs << elem } - @childs[0].should == @father - @childs[1].should == @son + it "returns children with attribute" do + @document.each_element_with_attribute("name") { |elem| @children << elem } + @children[0].should == @father + @children[1].should == @son end it "takes attribute value as second argument" do @document.each_element_with_attribute("name", "Fred"){ |elem| elem.should == @son } end - it "takes max number of childs as third argument" do - @document.each_element_with_attribute("name", nil, 1) { |elem| @childs << elem } - @childs.size.should == 1 - @childs[0].should == @father + it "takes max number of children as third argument" do + @document.each_element_with_attribute("name", nil, 1) { |elem| @children << elem } + @children.size.should == 1 + @children[0].should == @father end it "takes XPath filter as fourth argument" do diff --git a/spec/ruby/library/rexml/element/each_element_with_text_spec.rb b/spec/ruby/library/rexml/element/each_element_with_text_spec.rb index 8f9d062c99..a4a200d237 100644 --- a/spec/ruby/library/rexml/element/each_element_with_text_spec.rb +++ b/spec/ruby/library/rexml/element/each_element_with_text_spec.rb @@ -16,10 +16,10 @@ ruby_version_is ''...'3.0' do @document.root << @joe @document.root << @fred @document.root << @another - @childs = [] + @children = [] end - it "returns childs with text" do + it "returns children with text" do @document.each_element_with_text("Joe"){|c| c.should == @joe} end diff --git a/spec/ruby/library/rexml/element/has_text_spec.rb b/spec/ruby/library/rexml/element/has_text_spec.rb index de19fe0763..206c167ae6 100644 --- a/spec/ruby/library/rexml/element/has_text_spec.rb +++ b/spec/ruby/library/rexml/element/has_text_spec.rb @@ -11,7 +11,7 @@ ruby_version_is ''...'3.0' do e.has_text?.should be_true end - it "returns false if it has no Text childs" do + it "returns false if it has no Text children" do e = REXML::Element.new("Person") e.has_text?.should be_false end |