Fixes to deal with Padrino 0.12.2 release

This commit is contained in:
Ben Hollis 2014-05-15 23:30:49 -07:00
parent 6238bb0716
commit 82636e3596
2 changed files with 10 additions and 9 deletions

View file

@ -9,11 +9,9 @@ Feature: select_tag helper
"""
And the Server is running at "indexable-app"
When I go to "/select_tag.html"
Then I should see:
"""
<select name="colors" include_blank="Choose a color"><option value="">Choose a color</option>
<option value="red">red</option>
<option value="blue">blue</option>
<option value="blorange">blorange</option>
</select>
"""
Then I should see '<select name="colors"'
Then I should see '<option value="">Choose a color</option>'
Then I should see '<option value="red">red</option>'
Then I should see '<option value="blue">blue</option>'
Then I should see '<option value="blorange">blorange</option>'
Then I should see '</select>'

View file

@ -1,6 +1,9 @@
# Require gem
require 'haml'
# Require padrino-helpers now so that we get a chance to replace their renderer with ours in Tilt.
require 'padrino-helpers'
module SafeTemplate
def render(*)
super.html_safe
@ -41,7 +44,7 @@ module Middleman
class << self
# Once registered
def registered(_)
::Tilt.prefer(::Middleman::Renderers::HamlTemplate, 'haml')
::Tilt.prefer(::Middleman::Renderers::HamlTemplate, :haml)
# Add haml helpers to context
::Middleman::TemplateContext.send :include, ::Haml::Helpers