#!/usr/bin/env ruby require 'test/unit' currentPath = File.dirname(__FILE__) require File.join( currentPath, '../lib/masterview' ) require File.join( currentPath, '../lib/masterview/directives/stylesheet_link' ) class StylesheetLinkTest < Test::Unit::TestCase include MasterView::Directives def setup @directives = MasterView::DirectiveSet.new end def test_default tag = MasterView::Tag.new(@directives, 'foo', {}, :normal, nil) @directives.directives = [] attr_value = "hello world" @directives << Stylesheet_link.new(attr_value) assert_equal nil, @directives.determine_dcs(:stag).render dcs = @directives.determine_dcs(:etag) dcs.context = tag.create_context assert_equal "<%= stylesheet_link_tag 'hello world' %>", dcs.render end end