Sha256: edca6be701d6e772df5f5174aa9cc45ace69ab5527ed8f694bce27d94f0db6bf

Contents?: true

Size: 1.1 KB

Versions: 3

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

3 entries across 3 versions & 1 rubygems

Version Path
fontcustom-1.0.1 spec/spec_helper.rb
fontcustom-1.0.0 spec/spec_helper.rb
fontcustom-1.0.0.pre2 spec/spec_helper.rb