Module: Zafu::TestHelper

Includes:
RubyLess::SafeClass
Defined in:
lib/zafu/test_helper.rb

Instance Method Summary collapse

Instance Method Details

#compilation_contextObject



15
16
17
# File 'lib/zafu/test_helper.rb', line 15

def compilation_context
  {:node => @node_context, :helper => self}
end

#zafu_erb(source, src_helper = self, compiler = Zafu::Compiler) ⇒ Object



7
8
9
# File 'lib/zafu/test_helper.rb', line 7

def zafu_erb(source, src_helper = self, compiler = Zafu::Compiler)
  Zafu::Template.new(source, src_helper, compiler).to_erb(compilation_context)
end

#zafu_render(source, src_helper = self, compiler = Zafu::Compiler) ⇒ Object



11
12
13
# File 'lib/zafu/test_helper.rb', line 11

def zafu_render(source, src_helper = self, compiler = Zafu::Compiler)
  eval Zafu::Template.new(source, src_helper, compiler).to_ruby(compilation_context)
end