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

fix encoding tests, #new no longer returns an instance of Sinatra::Base

This commit is contained in:
Konstantin Haase 2011-03-21 11:57:15 +01:00
parent 7d3b99ecfe
commit 933cdf6f7d

View file

@ -10,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.erb(File.read(@base.views + "/ascii.erb").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.erb(:utf8, {}, :value => "Some Lyrics".encode("ASCII"))
@base.new!.erb(:utf8, {}, :value => "Some Lyrics".encode("ASCII"))
end
end