Sha256: 2127c8377c5dac3b8f7aa822866b06271c703e2edc2fdb36bc4ba4ac45d9b3e6

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

require 'rspec'
require 'json'
require File.expand_path('../../lib/fontcustom.rb', __FILE__)

RSpec.configure do |c|
  def fixture(path)
    File.join(File.expand_path('../fixtures', __FILE__), path)
  end

  def data_file_contents
    {
      :fonts => %w|
        fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.woff
        fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.ttf
        fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.eot
        fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e.svg
      |,
      :templates => %w|fontcustom.css|,
      :file_name => "fontcustom-cc5ce52f2ae4f9ce2e7ee8131bbfee1e", 
      :glyphs => %w|a_r3ally-exotic-f1le-name c d|
    }
  end

  def fontforge_output
    "Copyright (c) 2000-2012 by George Williams.\n Executable based on sources from 14:57 GMT 31-Jul-2012-D.\n Library based on sources from 14:57 GMT 31-Jul-2012.\n#{data_file_contents.to_json}"
  end

  def capture(stream)
    begin
      stream = stream.to_s
      eval "$#{stream} = StringIO.new"
      yield
      result = eval("$#{stream}").string
    ensure
      eval("$#{stream} = #{stream.upcase}")
    end
    result
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fontcustom-1.0.0.pre spec/spec_helper.rb