require 'spec_helper' describe FontProcessor::FontFileNamingStrategy do before(:all) do @naming_strategy = FontProcessor::FontFileNamingStrategy.new("postscript.otf", "fixtures") @charset_id = "1" end it "can name a character set" do expect(@naming_strategy.char_set(@charset_id, FontProcessor::FontFormat.new(:ttf, :otf))).to eq "fixtures/charset-#{@charset_id}-otf.ttf" expect(@naming_strategy.char_set(@charset_id, FontProcessor::FontFormat.new(:cff, :otf))).to eq "fixtures/charset-#{@charset_id}-otf.otf" end end