Sha256: 737789e74f413139d4daa4cc98b2372e11f2cb3fdda1d253b9cb1b4bc242f404

Contents?: true

Size: 844 Bytes

Versions: 6

Compression:

Stored size: 844 Bytes

Contents

require 'spec_helper'
require 'blazing'
require 'blazing/cli/create'

describe Blazing::CLI::Create do

  before :each do
    @logger = double('logger', :log => nil, :report => nil)
    @config_generator = Blazing::CLI::Create.new(['repository_url'])
    @config_generator.instance_variable_set('@logger', @logger)
  end

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

  it 'creates an empty directory for the config file' do
    @config_generator.should_receive(:empty_directory).with(Blazing::DIRECTORY)
    @config_generator.create_blazing_dir
  end

  it 'creates the config file' do
    @config_generator.should_receive(:template).with('templates/blazing.tt', Blazing::CONFIGURATION_FILE)
    @config_generator.create_config_file
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
blazing-0.0.16 spec/blazing/cli/create_spec.rb
blazing-0.0.15 spec/blazing/cli/create_spec.rb
blazing-0.0.14 spec/blazing/cli/create_spec.rb
blazing-0.0.13 spec/blazing/cli/create_spec.rb
blazing-0.0.12 spec/blazing/cli/create_spec.rb
blazing-0.0.10 spec/blazing/cli/create_spec.rb