Sha256: d3e6a76dabf524bcf88b0f362380dea0e204cfc72bef6256579ccaeba0452560

Contents?: true

Size: 1.07 KB

Versions: 29

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'
require 'awestruct/deploy/base_deploy'

describe Awestruct::Deploy::Base do
  before :each do
    @site_config = double
    @site_config.stub(:output_dir).and_return '_site'

    @deploy_config = double
    @deploy_config.stub(:[]).with('branch').and_return('the-branch')
    @deploy_config.stub(:[]).with('repository').and_return('the-repo')
    @deploy_config.stub(:[]).with('gzip').and_return('false')
    @deploy_config.stub(:[]).with('gzip_level')
    @deploy_config.stub(:[]).with('scm').and_return('git')
    @deploy_config.stub(:[]).with('source_dir').and_return('.')
    @deploy_config.stub(:[]).with('uncommitted').and_return('false') 
    Awestruct::ExceptionHelper.class_variable_set :@@failed, false
  end 

  it "should not run if the build failed" do 
    log = StringIO.new
    $LOG = Logger.new(log)
    $LOG.level = Logger::DEBUG 
    Awestruct::ExceptionHelper.mark_failed 

    deployer = Awestruct::Deploy::Base.new(@site_config, @deploy_config)
    deployer.run
    expect(log.string).to include('Not running deploy due to build failure')
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
awestruct-0.6.7 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.6 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.5 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.4 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.3 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.2 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.1 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.0 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.0.RC1 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.0.alpha4 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.0.alpha3 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.6.0.alpha1 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.5.7 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.5.7.RC2 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.5.7.RC1 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.5.6 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.5.6.beta9 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.5.6.beta8 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.5.6.beta7 spec/awestruct/deploy/base_deploy_spec.rb
awestruct-0.5.6.beta6 spec/awestruct/deploy/base_deploy_spec.rb