spec/font_spec.rb in prawn-2.0.2 vs spec/font_spec.rb in prawn-2.1.0
- old
+ new
@@ -263,15 +263,15 @@
def page_includes_font?(font)
@pdf.page.fonts.values.map { |e| e.data[:BaseFont] }.include?(font.to_sym)
end
def page_should_include_font(font)
- expect(page_includes_font?(font)).to be_true
+ expect(page_includes_font?(font)).to eq true
end
def page_should_not_include_font(font)
- expect(page_includes_font?(font)).to be_false
+ expect(page_includes_font?(font)).to eq false
end
end
describe "AFM fonts" do
before do
@@ -311,17 +311,17 @@
describe "when normalizing encoding" do
it "should not modify the original string when normalize_encoding() is used" do
original = "Foo"
normalized = @times.normalize_encoding(original)
- expect(original.equal?(normalized)).to be_false
+ expect(original.equal?(normalized)).to eq false
end
it "should modify the original string when normalize_encoding!() is used" do
original = "Foo"
normalized = @times.normalize_encoding!(original)
- expect(original.equal?(normalized)).to be_true
+ expect(original.equal?(normalized)).to eq true
end
end
it "should omit /Encoding for symbolic fonts" do
zapf = @pdf.find_font "ZapfDingbats"
@@ -333,29 +333,29 @@
describe "#glyph_present" do
before(:each) { create_pdf }
it "should return true when present in an AFM font" do
font = @pdf.find_font("Helvetica")
- expect(font.glyph_present?("H")).to be_true
+ expect(font.glyph_present?("H")).to eq true
end
it "should return false when absent in an AFM font" do
font = @pdf.find_font("Helvetica")
- expect(font.glyph_present?("再")).to be_false
+ expect(font.glyph_present?("再")).to eq false
end
it "should return true when present in a TTF font" do
font = @pdf.find_font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
- expect(font.glyph_present?("H")).to be_true
+ expect(font.glyph_present?("H")).to eq true
end
it "should return false when absent in a TTF font" do
font = @pdf.find_font("#{Prawn::DATADIR}/fonts/DejaVuSans.ttf")
- expect(font.glyph_present?("再")).to be_false
+ expect(font.glyph_present?("再")).to eq false
font = @pdf.find_font("#{Prawn::DATADIR}/fonts/gkai00mp.ttf")
- expect(font.glyph_present?("€")).to be_false
+ expect(font.glyph_present?("€")).to eq false
end
end
describe "TTF fonts" do
before do
@@ -408,16 +408,16 @@
describe "when normalizing encoding" do
it "should not modify the original string when normalize_encoding() is used" do
original = "Foo"
normalized = @font.normalize_encoding(original)
- expect(original.equal?(normalized)).to be_false
+ expect(original.equal?(normalized)).to eq false
end
it "should modify the original string when normalize_encoding!() is used" do
original = "Foo"
normalized = @font.normalize_encoding!(original)
- expect(original.equal?(normalized)).to be_true
+ expect(original.equal?(normalized)).to eq true
end
end
end
describe "DFont fonts" do