1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

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>
This commit is contained in:
elij 2011-02-23 23:18:32 -08:00 committed by Konstantin Haase
parent 879adf4a68
commit 85473875cb
3 changed files with 6 additions and 5 deletions

View file

@ -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 file

@ -1,2 +1,2 @@
This file has no unicode in it!
= value
<%= value %>

View file

@ -1,2 +1,2 @@
%h1= value
<h1><%= value %></h1>
Ingen vill veta var du köpt din tröja.