spec/spec_helper.rb
def render(template, stubs={})
  template = File.read(".#{template}")
  template_object = Object.new
  template_object.stub!({:content_for => nil, :haml => nil}.merge(stubs))
  engine = Haml::Engine.new(template)
  @rendered = engine.render(template_object, assigns_for_template)
end
# Renders the supplied template with Haml::Engine and assigns the
# @rendered instance variable
Renders the supplied template with Haml::Engine and assigns the
Renders the supplied template with Haml :: Engine and assigns the
def render(template, stubs={})
  template = File.read(".#{template}")
  template_object = Object.new
  template_object.stub!({:content_for => nil, :haml => nil}.merge(stubs))
  engine = Haml::Engine.new(template)
  @rendered = engine.render(template_object, assigns_for_template)
end
def render ( template , stubs = { } ) template = File . read ( ".#{template}" ) template_object = Object . new template_object . stub! ( { :content_for => nil , :haml => nil } . merge ( stubs ) ) engine = Haml :: Engine . new ( template ) @rendered = engine . render ( template_object , assigns_for_template ) end
Renders the supplied template with Haml::Engine and assigns the
Renders the supplied template with Haml :: Engine and assigns the
template
stubs
rendered
None