Sha256: 3b25c9cddfd99b7865397f05c249d632725cf2f75db3f22f017fb225ebffb079

Contents?: true

Size: 458 Bytes

Versions: 9

Compression:

Stored size: 458 Bytes

Contents

require 'spec_helper'
require 'blazing/cli/hook'

describe Blazing::CLI::Hook do

  it 'knows the source root for its tempate' do
    Blazing::CLI::Hook.source_root.should == File.dirname(__FILE__).gsub('spec', 'lib')
  end

  it 'genereates the hook template in the correct location' do
    @hook = Blazing::CLI::Hook.new(['test_target'])
    @hook.should_receive(:template).with('templates/post-hook.tt', '/tmp/post-receive')
    @hook.generate
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blazing-0.0.16 spec/blazing/cli/hook_spec.rb
blazing-0.0.15 spec/blazing/cli/hook_spec.rb
blazing-0.0.14 spec/blazing/cli/hook_spec.rb
blazing-0.0.13 spec/blazing/cli/hook_spec.rb
blazing-0.0.12 spec/blazing/cli/hook_spec.rb
blazing-0.0.10 spec/blazing/cli/hook_spec.rb
blazing-0.0.9 spec/blazing/cli/hook_spec.rb
blazing-0.0.8 spec/blazing/cli/hook_spec.rb
blazing-0.0.7 spec/blazing/cli/hook_spec.rb