Sha256: fa1b4ab2d384297eab8d375375fa670cd65e3733f881cc89e919705a7bed2cdf
Contents?: true
Size: 1.59 KB
Versions: 1
Compression:
Stored size: 1.59 KB
Contents
require 'spec_helper' require 'heirloom/cli' describe Heirloom do before do options = { :name => 'archive_name', :id => '1.0.0', :level => 'info', :output => '/tmp/test123', :region => 'us-east-1', :base_prefix => 'base' } @logger_stub = stub 'logger' @config_mock = mock 'config' @archive_mock = mock 'archive' @config_mock.stub :logger => @logger_stub, :access_key => 'key', :secret_key => 'secret' Trollop.stub(:options).and_return options Heirloom::HeirloomLogger.should_receive(:new). with(:log_level => 'info'). and_return @logger_stub Heirloom::CLI::Download.any_instance.should_receive(:load_config). with(:logger => @logger_stub, :opts => options). and_return @config_mock Heirloom::Archive.should_receive(:new). with(:id => '1.0.0', :name => 'archive_name', :config => @config_mock). and_return @archive_mock @cli_download = Heirloom::CLI::Download.new end it "should download an archive" do @archive_mock.should_receive(:download).with :output => '/tmp/test123', :region => 'us-east-1', :base_prefix => 'base' @cli_download.download end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
heirloom-0.5.0rc1 | spec/cli/download_spec.rb |