Sha256: 1b0e2ee5b03ca0d02333fd136e2a1caef796e434455947c042e7b78905323072

Contents?: true

Size: 849 Bytes

Versions: 5

Compression:

Stored size: 849 Bytes

Contents

require File.expand_path("../../spec_helper", File.dirname(__FILE__))

describe Sprinkle::Installers::Thor do

  before do
    @package = double(Sprinkle::Package, :name => 'spec')
  end

  def create_thor(names, options = {}, &block)
    Sprinkle::Installers::Thor.new(@package, names, options, &block)
  end

  describe 'during installation' do

    it 'should invoke the thor executer for all specified tasks' do
      @installer = create_thor 'spec'
      @install_commands = @installer.send :install_commands
      @install_commands.should =~ /thor spec/
    end

    it 'should invoke the thor executer for all specified tasks' do
      @installer = create_thor 'spec', :thorfile => '/some/Thorfile'
      @install_commands = @installer.send :install_commands
      @install_commands.should == "thor -f /some/Thorfile spec"
    end

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sprinkle-0.7.7 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.7.6.2 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.7.6.1 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.7.6 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.7.5 spec/sprinkle/installers/thor_spec.rb