Namespace
- CLASS NodeTest::MockNode
Methods
- S
- T
Instance Public methods
setup()
Link
test_find()
Link
test_match()
Link
test_parse_relaxed()
Link
# File actionpack/test/template/html-scanner/node_test.rb, line 46 def test_parse_relaxed s = "<b foo='hello'' bar='baz'>" node = nil assert_nothing_raised { node = HTML::Node.parse(nil,0,0,s,false) } assert node.attributes.has_key?("foo") assert !node.attributes.has_key?("bar") end
test_parse_relaxed_with_unterminated_cdata_section()
Link
# File actionpack/test/template/html-scanner/node_test.rb, line 82 def test_parse_relaxed_with_unterminated_cdata_section s = "<![CDATA[neverending..." node = nil assert_nothing_raised { node = HTML::Node.parse(nil,0,0,s,false) } assert_kind_of HTML::CDATA, node assert_equal 'neverending...', node.content end
test_parse_strict()
Link
test_parse_strict_with_unterminated_cdata_section()
Link
test_parse_with_unclosed_tag()
Link
test_parse_with_valid_cdata_section()
Link
# File actionpack/test/template/html-scanner/node_test.rb, line 69 def test_parse_with_valid_cdata_section s = "<![CDATA[<span>contents</span>]]>" node = nil assert_nothing_raised { node = HTML::Node.parse(nil,0,0,s,false) } assert_kind_of HTML::CDATA, node assert_equal '<span>contents</span>', node.content end
test_tag()
Link
test_to_s()
Link
test_to_s_with_boolean_attrs()
Link