spec/fontist/system_font_spec.rb in fontist-1.0.0 vs spec/fontist/system_font_spec.rb in fontist-1.1.0

- old
+ new

@@ -22,9 +22,14 @@ expect(calbiri.join("|").downcase).to include("#{name.downcase}.ttf") end end context "with invalid font" do + it "returns nil for partial-not match" do + name = "Deje" + expect(Fontist::SystemFont.find(name)).to be_nil + end + it "returns nill to the caller" do name = "invalid-font.ttf" invalid_font = Fontist::SystemFont.find(name, sources: [font_sources]) expect(invalid_font).to be_nil