diff options
| author | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2019-07-27 12:40:09 +0200 |
| commit | 5c276e1cc91c5ab2a41fbf7827af2fed914a2bc0 (patch) | |
| tree | 05b5c68c8b2a00224d4646ea3b26ce3877efaadd /spec/ruby/library/rexml | |
| parent | a06301b103371b0b7da8eaca26ba744961769f99 (diff) | |
Update to ruby/spec@875a09e
Diffstat (limited to 'spec/ruby/library/rexml')
| -rw-r--r-- | spec/ruby/library/rexml/attribute/remove_spec.rb | 2 | ||||
| -rw-r--r-- | spec/ruby/library/rexml/attribute/xpath_spec.rb | 2 | ||||
| -rw-r--r-- | spec/ruby/library/rexml/document/add_spec.rb | 2 | ||||
| -rw-r--r-- | spec/ruby/library/rexml/document/new_spec.rb | 2 | ||||
| -rw-r--r-- | spec/ruby/library/rexml/text/new_spec.rb | 4 | ||||
| -rw-r--r-- | spec/ruby/library/rexml/text/read_with_substitution_spec.rb | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/library/rexml/attribute/remove_spec.rb b/spec/ruby/library/rexml/attribute/remove_spec.rb index b97b860a5f..08d22cb6ba 100644 --- a/spec/ruby/library/rexml/attribute/remove_spec.rb +++ b/spec/ruby/library/rexml/attribute/remove_spec.rb @@ -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 diff --git a/spec/ruby/library/rexml/attribute/xpath_spec.rb b/spec/ruby/library/rexml/attribute/xpath_spec.rb index beefb036cc..8335e0a8ef 100644 --- a/spec/ruby/library/rexml/attribute/xpath_spec.rb +++ b/spec/ruby/library/rexml/attribute/xpath_spec.rb @@ -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 diff --git a/spec/ruby/library/rexml/document/add_spec.rb b/spec/ruby/library/rexml/document/add_spec.rb index a200da1e3d..db95114e7e 100644 --- a/spec/ruby/library/rexml/document/add_spec.rb +++ b/spec/ruby/library/rexml/document/add_spec.rb @@ -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 diff --git a/spec/ruby/library/rexml/document/new_spec.rb b/spec/ruby/library/rexml/document/new_spec.rb index 39e806a472..3ff5e99b25 100644 --- a/spec/ruby/library/rexml/document/new_spec.rb +++ b/spec/ruby/library/rexml/document/new_spec.rb @@ -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 diff --git a/spec/ruby/library/rexml/text/new_spec.rb b/spec/ruby/library/rexml/text/new_spec.rb index a1fdcddf28..3c081dec30 100644 --- a/spec/ruby/library/rexml/text/new_spec.rb +++ b/spec/ruby/library/rexml/text/new_spec.rb @@ -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 diff --git a/spec/ruby/library/rexml/text/read_with_substitution_spec.rb b/spec/ruby/library/rexml/text/read_with_substitution_spec.rb index a9b4d30bc5..83b42f6d6b 100644 --- a/spec/ruby/library/rexml/text/read_with_substitution_spec.rb +++ b/spec/ruby/library/rexml/text/read_with_substitution_spec.rb @@ -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 |
