Sha256: 2e50a799ded2f127dea74f83d84deaef4b5d2b39c0e4c9b7f0ac9e82e17f67ec

Contents?: true

Size: 847 Bytes

Versions: 19

Compression:

Stored size: 847 Bytes

Contents

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

describe Sprinkle::Installers::Thor do

  before do
    @package = mock(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

19 entries across 19 versions & 1 rubygems

Version Path
sprinkle-0.7.4 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.7.3 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.7.2 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.7.1.1 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.7.1 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.7 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.6.2 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.6.1.1 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.6.1 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.6.0 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.5.2 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.5.1.1 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.5.1 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.5.0 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.5.0.rc1 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.4.2 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.4.1 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.4.0 spec/sprinkle/installers/thor_spec.rb
sprinkle-0.3.6 spec/sprinkle/installers/thor_spec.rb