require 'test_helper'
class String
def blank?
self == ''
end
end
class ZafuTest < Test::Unit::TestCase
include RubyLess::SafeClass
include Zafu::TestHelper
safe_method :one => {:class => String, :method => "main_one"}
class Dummy
include RubyLess::SafeClass
safe_method :hello => String
safe_method :one => {:class => String, :method => "dummy_one"}
end
safe_method :dum => Dummy
safe_method :dum2 => {:class => Dummy, :nil => true}
context 'Compilation in a model' do
setup do
@node_context = Zafu::NodeContext.new('@test', Dummy)
end
should 'start method lookup in the template' do
assert_equal '<%= main_one %>', zafu_erb('