Sha256: a4f49d0fed6587e0366e2271a5fe5425849f55329c5334d2b28ccd309fca5b8c
Contents?: true
Size: 685 Bytes
Versions: 14
Compression:
Stored size: 685 Bytes
Contents
require './test/test_helper' describe WebFont::Index do describe '.download' do it 'download google fonts data and creates index.json' do WebFont::Index.download File.exist?("#{WebFont::Index.path}/fonts.json").must_equal true File.exist?("#{WebFont::Index.path}/index.json").must_equal true file = File.open("#{WebFont::Index.path}/index.json") indices = JSON.parse(file.read) file.close start = 0 indices.each do |alphabet, hash| if alphabet == 'a' hash['start'].must_equal 0 else hash['start'].must_equal start end start = hash['end'] + 1 end end end end
Version data entries
14 entries across 14 versions & 1 rubygems