test/unit/xml_required_test.rb in roxml-2.5.3 vs test/unit/xml_required_test.rb in roxml-3.1.0
- old
+ new
@@ -1,6 +1,6 @@
-require File.join(File.dirname(__FILE__), '..', 'test_helper')
+require 'test/test_helper'
class TestXMLRequired < ActiveSupport::TestCase
def setup
@full_book = <<BOOK
<book ISBN="1234">
@@ -68,10 +68,11 @@
BookWithRequired.from_xml(@full_book)
end
def test_required_throws_on_attr_absence
assert_raise ROXML::RequiredElementMissing do
- BookWithRequired.from_xml(@book_missing_attr)
end
+ BookWithRequired.from_xml(@book_missing_attr)
+ end
end
def test_required_throws_on_text_absence
assert_raise ROXML::RequiredElementMissing do
BookWithRequired.from_xml(@book_missing_text)
\ No newline at end of file