From 50890f523a881696c7eee08d73e0fbf67a2d1375 Mon Sep 17 00:00:00 2001 From: nex3 Date: Fri, 19 Jan 2007 02:54:40 +0000 Subject: [PATCH] Fixes in trunk for Rails 1.2. git-svn-id: svn://hamptoncatlin.com/haml/trunk@289 7063305b-7217-0410-af8c-cdc13e5119b9 --- lib/haml/helpers/action_view_mods.rb | 1 + test/haml/helper_test.rb | 2 +- test/haml/results/silent_script.xhtml | 2 +- test/haml/templates/silent_script.haml | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/haml/helpers/action_view_mods.rb b/lib/haml/helpers/action_view_mods.rb index 4d93bba3..d0e20134 100644 --- a/lib/haml/helpers/action_view_mods.rb +++ b/lib/haml/helpers/action_view_mods.rb @@ -1,6 +1,7 @@ begin require 'rubygems' require 'active_support' + require 'action_controller' require 'action_view' action_view_included = true rescue LoadError diff --git a/test/haml/helper_test.rb b/test/haml/helper_test.rb index 0892b857..9cf2ea9d 100644 --- a/test/haml/helper_test.rb +++ b/test/haml/helper_test.rb @@ -94,7 +94,7 @@ class HelperTest < Test::Unit::TestCase # two behaviors. result = render("- form_tag 'foo' do\n %p bar\n %strong baz", :action_view) - new_rails = "
\n

foo

\n
\n" + new_rails = "
\n

bar

\n baz\n
" old_rails = "" assert(result == new_rails || result == old_rails) end diff --git a/test/haml/results/silent_script.xhtml b/test/haml/results/silent_script.xhtml index e646942a..76e90e0b 100644 --- a/test/haml/results/silent_script.xhtml +++ b/test/haml/results/silent_script.xhtml @@ -50,7 +50,7 @@
  • z
  • I can catch errors!

    - Oh no! "uninitialized constant Foo" happened! + Oh no! "undefined method `silly' for String:Class" happened!

    "false" is: false diff --git a/test/haml/templates/silent_script.haml b/test/haml/templates/silent_script.haml index fc6efa03..45199f0b 100644 --- a/test/haml/templates/silent_script.haml +++ b/test/haml/templates/silent_script.haml @@ -8,7 +8,7 @@ %li= i %h1 I can catch errors! - begin - - Foo.silly + - String.silly - rescue NameError => e = "Oh no! \"#{e}\" happened!" %p