Skip to content

Commit

Permalink
Update the render spec helper to work with view paths that do not sta…
Browse files Browse the repository at this point in the history
…rt with an initial slash.
  • Loading branch information
eee-c committed Mar 28, 2009
1 parent 32cc9a2 commit 1a73f29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Expand Up @@ -14,8 +14,8 @@

# Renders the supplied template with Haml::Engine and assigns the
# @response instance variable
def render(template)
template = File.read(".#{template}")
def render(template_path)
template = File.read("./#{template_path.sub(/^\//, '')}")
engine = Haml::Engine.new(template)
@response = engine.render(Object.new, assigns_for_template)
end
Expand Down

0 comments on commit 1a73f29

Please sign in to comment.