Sha256: 674778d6ddd865f1936d76bcb9f169c5aebf5329f054fcabb2a3bbccdeddc9e1

Contents?: true

Size: 784 Bytes

Versions: 8

Compression:

Stored size: 784 Bytes

Contents

require "spec_helper"

RSpec.describe Fontist::Formulas::StixFont do
  describe "initializing" do
    it "builds the data dictionary" do
      formula = Fontist::Formulas::StixFont.instance

      expect(formula.fonts.count).to eq(2)
      expect(formula.fonts.first[:name]).to eq("STIX Two Math")
    end
  end

  describe "installation" do
    context "with valid licence agreement" do
      it "installs the valid fonts" do
        name = "STIX Two Math"
        confirmation = "yes"

        stub_fontist_path_to_temp_path
        paths = Fontist::Formulas::StixFont.fetch_font(
          name, confirmation: confirmation
        )

        expect(Fontist::Font.find(name)).not_to be_empty
        expect(paths.first).to include("fonts/STIX2Math.otf")
      end
    end
  end
end

Version data entries

8 entries across 7 versions & 2 rubygems

Version Path
fontist-1.3.0 spec/fontist/formulas/stix_fonts_spec.rb
fontist-1.2.1 spec/fontist/formulas/stix_fonts_spec.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/fontist-1.1.0/spec/fontist/formulas/stix_fonts_spec.rb
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/fontist-1.2.0/spec/fontist/formulas/stix_fonts_spec.rb
fontist-1.2.0 spec/fontist/formulas/stix_fonts_spec.rb
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/fontist-1.1.0/spec/fontist/formulas/stix_fonts_spec.rb
fontist-1.1.0 spec/fontist/formulas/stix_fonts_spec.rb
fontist-1.0.0 spec/fontist/formulas/stix_fonts_spec.rb