Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 19 lines (16 sloc) 0.606 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# 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
    next unless defined? Encoding
    @base.new.haml(File.read(@base.views + "/ascii.haml").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"))
  end
end
Something went wrong with that request. Please try again.