Skip to content

Commit

Permalink
fix encoding tests, #new no longer returns an instance of Sinatra::Base
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Mar 21, 2011
1 parent 0e2f2bd commit e97c3fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/encoding_test.rb
Expand Up @@ -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

0 comments on commit e97c3fb

Please sign in to comment.