1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2019-07-27 12:40:09 +02:00
parent a06301b103
commit 5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions

View file

@ -15,6 +15,6 @@ describe "REXML::Attribute#remove" do
end
it "does not anything if element has no parent" do
lambda {@attr.remove}.should_not raise_error(Exception)
-> {@attr.remove}.should_not raise_error(Exception)
end
end

View file

@ -14,6 +14,6 @@ describe "REXML::Attribute#xpath" do
end
it "raises an error if attribute has no parent" do
lambda { @attr.xpath }.should raise_error(Exception)
-> { @attr.xpath }.should raise_error(Exception)
end
end

View file

@ -44,7 +44,7 @@ describe :rexml_document_add, shared: true do
end
it "refuses to add second root" do
lambda { @doc.send(@method, REXML::Element.new("foo")) }.should raise_error(RuntimeError)
-> { @doc.send(@method, REXML::Element.new("foo")) }.should raise_error(RuntimeError)
end
end

View file

@ -27,7 +27,7 @@ describe "REXML::Document#new" do
end
it "raises an error if source is not a Document, String or IO" do
lambda {REXML::Document.new(3)}.should raise_error(RuntimeError)
-> {REXML::Document.new(3)}.should raise_error(RuntimeError)
end
it "does not perform XML validation" do

View file

@ -28,12 +28,12 @@ describe "REXML::Text.new" do
t = REXML::Text.new("<&>", false, nil, true)
t.should == "<&>"
lambda{ REXML::Text.new("<&>", false, nil, true)}.should raise_error(Exception)
->{ REXML::Text.new("<&>", false, nil, true)}.should raise_error(Exception)
end
it "uses raw value of the parent if raw is nil" do
e1 = REXML::Element.new("root", nil, { raw: :all})
lambda {REXML::Text.new("<&>", false, e1)}.should raise_error(Exception)
-> {REXML::Text.new("<&>", false, e1)}.should raise_error(Exception)
e2 = REXML::Element.new("root", nil, { raw: []})
e2.raw.should be_false

View file

@ -7,6 +7,6 @@ describe "REXML::Text.read_with_substitution" do
end
it "accepts an regex for invalid expressions and raises an error if text matches" do
lambda {REXML::Text.read_with_substitution("this is illegal", /illegal/)}.should raise_error(Exception)
-> {REXML::Text.read_with_substitution("this is illegal", /illegal/)}.should raise_error(Exception)
end
end