Permalink
Browse files

remove haml requirement for running the base tests

fixes #193

this removes the last 'hard' template test requirement that sinatra itself does
not require

Signed-off-by: Konstantin Haase <konstantin.mailinglists@googlemail.com>
  • Loading branch information...
1 parent 879adf4 commit 85473875cbce76e9f64bcd7ae2a0ef6b48dd2a55 elij committed with rkh Feb 24, 2011
Showing with 6 additions and 5 deletions.
  1. +4 −3 test/encoding_test.rb
  2. +1 −1 test/views/{ascii.haml → ascii.erb}
  3. +1 −1 test/views/{utf8.haml → utf8.erb}
View
7 test/encoding_test.rb
@@ -1,5 +1,6 @@
# encoding: UTF-8
require File.dirname(__FILE__) + '/helper'
+require 'erb'
class BaseTest < Test::Unit::TestCase
setup do
@@ -9,11 +10,11 @@ class BaseTest < Test::Unit::TestCase
it 'allows unicode strings in ascii templates per default (1.9)' do
next unless defined? Encoding
- @base.new.haml(File.read(@base.views + "/ascii.haml").encode("ASCII"), {}, :value => "åkej")
+ @base.new.erb(File.read(@base.views + "/ascii.erb").encode("ASCII"), {}, :value => "åkej")
end
it 'allows ascii strings in unicode templates per default (1.9)' do
next unless defined? Encoding
- @base.new.haml(:utf8, {}, :value => "Some Lyrics".encode("ASCII"))
+ @base.new.erb(:utf8, {}, :value => "Some Lyrics".encode("ASCII"))
end
-end
+end
View
2 test/views/ascii.haml → test/views/ascii.erb
@@ -1,2 +1,2 @@
This file has no unicode in it!
-= value
+<%= value %>
View
2 test/views/utf8.haml → test/views/utf8.erb
@@ -1,2 +1,2 @@
-%h1= value
+<h1><%= value %></h1>
Ingen vill veta var du köpt din tröja.

0 comments on commit 8547387

Please sign in to comment.