-
-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
duplicating erorrs works. yay! closes #148
- Loading branch information
1 parent
cb102e9
commit 33922d7
Showing
5 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
require "helper" | ||
|
||
module Nokogiri | ||
module XML | ||
class TestSyntaxError < Nokogiri::TestCase | ||
def test_new | ||
error = Nokogiri::XML::SyntaxError.new 'hello' | ||
assert_equal 'hello', error.message | ||
end | ||
|
||
def test_exception | ||
error = Nokogiri::XML::SyntaxError.new 'hello' | ||
dup = error.exception 'world' | ||
assert_equal 'hello', dup.message | ||
assert_not_equal error.message.object_id, dup.message.object_id | ||
end | ||
|
||
def test_initialize_copy | ||
error = Nokogiri::XML::SyntaxError.new 'hello' | ||
dup = error.dup | ||
assert_equal 'hello', dup.message | ||
assert_not_equal error.object_id, dup.object_id | ||
assert_not_equal error.message.object_id, dup.message.object_id | ||
end | ||
end | ||
end | ||
end |