mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@875a09e
This commit is contained in:
parent
a06301b103
commit
5c276e1cc9
1247 changed files with 5316 additions and 5028 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue