spec/fontist/installer_spec.rb in fontist-0.3.0 vs spec/fontist/installer_spec.rb in fontist-0.4.0
- old
+ new
@@ -1,12 +1,12 @@
require "spec_helper"
RSpec.describe Fontist::Installer do
describe ".download" do
context "with already downloaded fonts", skip_in_windows: true do
- it "returns the font path" do
- name = "CALIBRI.TTF"
+ it "returns the font path", file_download: true do
+ name = "Arial"
Fontist::Formulas::MsVista.fetch_font(name, confirmation: "yes")
allow(Fontist::Formulas::MsVista).to receive(:fetch_font).and_return(nil)
paths = Fontist::Installer.download(name, confirmation: "yes")
@@ -14,20 +14,20 @@
end
end
context "with missing but downloadable fonts" do
it "downloads and install the fonts", skip_in_windows: true do
- name = "CALIBRI.TTF"
+ name = "Arial"
confirmation = "yes"
allow(Fontist::SystemFont).to receive(:find).and_return(nil)
paths = Fontist::Installer.download(name, confirmation: confirmation)
expect(paths.first).to include("fonts/#{name}")
end
it "do not download if user didn't agree" do
- name = "CALIBRI.TTF"
+ name = "Calibri"
allow(Fontist::SystemFont).to receive(:find).and_return(nil)
expect {
Fontist::Installer.download(name, confirmation: "no")
}.to raise_error(Fontist::Errors::LicensingError)