Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 85473875cbce76e9f64bcd7ae2a0ef6b48dd2a55 1 parent 879adf4
elij authored rkh committed
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.
Please sign in to comment.
Something went wrong with that request. Please try again.