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

@ -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