Sha256: e476e1465b09cf6c84c9cfd40cf91f8cbc9085b81de7bb0cec546627fcddb5e8
Contents?: true
Size: 922 Bytes
Versions: 12
Compression:
Stored size: 922 Bytes
Contents
require 'test_helper' class AllowFailureAnvilTest < Test::Unit::TestCase def setup @buildpack_path = File.expand_path 'test/fixtures/buildpacks/heroku-buildpack-ruby' end def test_allowed_failure Hatchet::AnvilApp.new("no_lockfile", buildpack: @buildpack_path, allow_failure: true).deploy do |app, heroku, output| refute app.deployed? assert_match "Gemfile.lock required", output end end def test_failure_with_no_flag assert_raise(Anvil::Builder::BuildError) do Hatchet::AnvilApp.new("no_lockfile", buildpack: @buildpack_path).deploy end end def test_retries Hatchet.const_set(:RETRIES, 2) assert_raise(Anvil::Builder::BuildError) do app = Hatchet::AnvilApp.new("no_lockfile", buildpack: @buildpack_path) app.expects(:push!).twice.raises(Anvil::Builder::BuildError) app.deploy end ensure Hatchet.const_set(:RETRIES, 1) end end
Version data entries
12 entries across 12 versions & 1 rubygems