Sha256: 965e13bf1d29aefb38a579e86545e7b5918534fd723b4a122b475bf9b1355e98
Contents?: true
Size: 685 Bytes
Versions: 11
Compression:
Stored size: 685 Bytes
Contents
require 'test/unit' require 'webgen/tree' require 'webgen/contentprocessor' class TestContentProcessorSass < Test::Unit::TestCase def test_call obj = Webgen::ContentProcessor::Sass.new root = Webgen::Node.new(Webgen::Tree.new.dummy_root, '/', '/') node = Webgen::Node.new(root, 'test', 'test') context = Webgen::ContentProcessor::Context.new(:content => "#main\n :background-color #000", :chain => [node]) obj.call(context) assert_equal("#main {\n background-color: #000; }\n", context.content) context.content = "#cont \n = unknown" assert_raise(RuntimeError) { obj.call(context) } end end
Version data entries
11 entries across 11 versions & 2 rubygems