Sha256: 96fc75f5819f7d80711c7498fc25823b26ecc4062c4c747a2b2807746ec67b0e

Contents?: true

Size: 795 Bytes

Versions: 8

Compression:

Stored size: 795 Bytes

Contents

require 'spec_helper'

describe Fontrobot do
  let (:input_dir) { 'spec/fixtures/vectors' }
  let (:output_dir) { 'tmp' }
  let (:fontrobot) { Fontrobot }

  before(:all) do
    fontrobot.watch(input_dir, output_dir)
  end

  context '#watch' do
    it 'should detect when a vector file changes' do
      `mv spec/fixtures/vectors/B.svg spec/fixtures/vectors/E.svg`
      sleep 1
      fontrobot.should_receive(:compile).with(input_dir, output_dir)
    end

    it 'should detect when a vector file is added' do
    end

    it 'should detect when a vector file is removed' do
    end

    it 'should send complain if the dir has no vectors' do
    end
  end

  after(:all) do
    Fontrobot.stop
    `mv spec/fixtures/vectors/E.svg spec/fixtures/vectors/B.svg`
    cleanup(output_dir)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fontrobot-0.1.8 spec/fontrobot/watcher_spec.rb.off
fontrobot-0.1.7 spec/fontrobot/watcher_spec.rb.off
fontrobot-0.1.6 spec/fontrobot/watcher_spec.rb.off
fontrobot-0.1.5 spec/fontrobot/watcher_spec.rb.off
fontrobot-0.1.4 spec/fontrobot/watcher_spec.rb.off
fontrobot-0.1.3 spec/fontrobot/watcher_spec.rb.off
fontrobot-0.1.2 spec/fontrobot/watcher_spec.rb.off
fontrobot-0.1 spec/fontrobot/watcher_spec.rb.off