mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
18 lines
No EOL
524 B
Ruby
18 lines
No EOL
524 B
Ruby
# encoding: UTF-8
|
|
require File.dirname(__FILE__) + '/helper'
|
|
|
|
class BaseTest < Test::Unit::TestCase
|
|
setup do
|
|
@base = Sinatra.new(Sinatra::Base)
|
|
@base.set :views, File.dirname(__FILE__) + "/views"
|
|
end
|
|
|
|
it 'allows unicode strings in ascii templates per default (1.9)' do
|
|
@base.new.haml(: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"))
|
|
end
|
|
end |