Sha256: 27578a75d0c164eadc664e774f36fc709dd9e87f149a441e230209a40cb3aa5f

Contents?: true

Size: 448 Bytes

Versions: 4

Compression:

Stored size: 448 Bytes

Contents

require './test/test_helper'

describe WebFont::Finder do
  let(:finder) { WebFont::Finder.new }

  describe '#find' do
    it 'returns font data when it found one' do
      font_name = 'Open Sans'
      item      = finder.find(font_name)

      item['family'].must_equal font_name
    end

    it 'returns nil when nothing is found' do
      font_name = 'Arial'
      item      = finder.find(font_name)

      item.must_be_empty
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
web_font-0.0.4 test/lib/web_font/finder_test.rb
web_font-0.0.3 test/lib/web_font/finder_test.rb
web_font-0.0.2 test/lib/web_font/finder_test.rb
web_font-0.0.1 test/lib/web_font/finder_test.rb