test/prawn/emoji/drawer_test.rb in prawn-emoji-2.0.1 vs test/prawn/emoji/drawer_test.rb in prawn-emoji-2.1.0
- old
+ new
@@ -5,11 +5,12 @@
describe Prawn::Emoji::Drawer do
let(:document) { Prawn::Document.new }
let(:drawer) { Prawn::Emoji::Drawer.new document: document }
let(:sushi) { '🍣' }
- let(:sushi_image) { Prawn::Emoji::Image.new(sushi) }
+ let(:sushi_unicode) { Prawn::Emoji::Unicode.new(sushi) }
+ let(:sushi_image) { Prawn::Emoji::Image.new(sushi_unicode) }
before do
document.font Prawn::Emoji.root.join 'test', 'fonts', 'DejaVuSans.ttf'
end
@@ -46,10 +47,10 @@
subject.must_be_same_as text
end
end
describe 'when includes emoji' do
- let(:text) { "aaa#{sushi}bbb"}
+ let(:text) { "aaa#{sushi}bbb" }
it 'draws image for included emoji' do
image_width = 12
image_at = [100 + document.width_of('aaa', text_options), 100 + 12]