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
1 changed files with 2 additions and 2 deletions

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