Skip to content

Commit

Permalink
Fixed something to do with how the requires work. Requiring the Activ…
Browse files Browse the repository at this point in the history
…eSupport stuff earlier on.

git-svn-id: svn://hamptoncatlin.com/haml/trunk@56 7063305b-7217-0410-af8c-cdc13e5119b9
  • Loading branch information
hcatlin committed Oct 2, 2006
1 parent d4a9a32 commit f024b2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/template_test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'test/unit'
require 'rubygems'
require 'active_support'
require 'action_view'

require File.dirname(__FILE__) + '/../lib/haml/template'
Expand Down Expand Up @@ -45,10 +46,10 @@ def test_action_view_templates_render_correctly

def test_instance_variables_should_work_inside_templates
@base.instance_variable_set("@content_for_layout", 'something')
assert_equal("<p>something</p>", render("%p= @content_for_layout").chomp)
assert_equal("<p>\n something\n</p>", render("%p= @content_for_layout").chomp)

@base.instance_eval("@author = 'Hampton Catlin'")
assert_equal("<div class='author'>Hampton Catlin</div>", render(".author= @author").chomp)
assert_equal("<div class='author'>\n Hampton Catlin\n</div>", render(".author= @author").chomp)

@base.instance_eval("@author = 'Hampton'")
assert_equal("Hampton", render("= @author").chomp)
Expand Down

0 comments on commit f024b2b

Please sign in to comment.