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" And the Server is running at "indexable-app"
When I go to "/select_tag.html" When I go to "/select_tag.html"
Then I should see: Then I should see '<select name="colors"'
""" Then I should see '<option value="">Choose a color</option>'
<select name="colors" include_blank="Choose a color"><option value="">Choose a color</option> Then I should see '<option value="red">red</option>'
<option value="red">red</option> Then I should see '<option value="blue">blue</option>'
<option value="blue">blue</option> Then I should see '<option value="blorange">blorange</option>'
<option value="blorange">blorange</option> Then I should see '</select>'
</select>
"""

View file

@ -1,6 +1,9 @@
# Require gem # Require gem
require 'haml' 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 module SafeTemplate
def render(*) def render(*)
super.html_safe super.html_safe
@ -41,7 +44,7 @@ module Middleman
class << self class << self
# Once registered # Once registered
def registered(_) def registered(_)
::Tilt.prefer(::Middleman::Renderers::HamlTemplate, 'haml') ::Tilt.prefer(::Middleman::Renderers::HamlTemplate, :haml)
# Add haml helpers to context # Add haml helpers to context
::Middleman::TemplateContext.send :include, ::Haml::Helpers ::Middleman::TemplateContext.send :include, ::Haml::Helpers