Sha256: 2686112f0a8e50265196500fda3bc96f9d1cbcbeb25f6e0d65ee6177fc44d1b2
Contents?: true
Size: 1018 Bytes
Versions: 1
Compression:
Stored size: 1018 Bytes
Contents
# $Id: tc_xslt_stylesheet.rb,v 1.1.1.1 2006/03/09 01:36:20 roscopeco Exp $ begin require 'xml/libxml' rescue LoadError require 'rubygems' and retry end $TDIR = File.dirname(__FILE__) require "#$TDIR/../ext/xml/libxslt" require 'test/unit' class TC_XSLT_STYLESHEET < Test::Unit::TestCase def setup() @xslt = XML::XSLT.file("#$TDIR/fuzface.xsl") @xslt.doc = XML::Document.file("#$TDIR/fuzface.xml") assert_instance_of(XML::XSLT, @xslt) assert_instance_of(XML::Document, @xslt.doc) @stylesheet = @xslt.parse assert_instance_of(XML::XSLT::Stylesheet, @stylesheet) end def tear_down() @xslt = nil @stylesheet = nil end def test_ruby_xslt_parse() assert_instance_of(XML::XSLT::Stylesheet, @stylesheet) end def test_ruby_xslt_stylesheet_to_s() @stylesheet.apply str = @stylesheet.to_s assert_instance_of(String, str) end def test_ruby_xslt_stylesheet_save() assert_raises(ArgumentError) do @stylesheet.save("str") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
libxslt-ruby-0.3.6 | tests/tc_xslt_stylesheet.rb |