Sha256: b2d51276346f8bdbced463148bbf7862f013f0a9e8d8014a9967a8b485e199f7

Contents?: true

Size: 1.18 KB

Versions: 25

Compression:

Stored size: 1.18 KB

Contents

require 'spec_helper'
require 'capistrano'

if defined?(Capistrano::Configuration.instance)
  describe 'Honeybadger::Capistrano' do
    require 'capistrano/configuration'
    require 'honeybadger/capistrano'

    before { reset_config }

    before(:each) do
      @configuration = Capistrano::Configuration.new
      Honeybadger::Capistrano.load_into(@configuration)
      @configuration.dry_run = true
    end

    it "defines honeybadger:deploy task" do
      expect(@configuration.find_task('honeybadger:deploy')).not_to be_nil
    end

    it "logs when calling honeybadger:deploy task" do
      @configuration.set(:current_revision, '084505b1c0e0bcf1526e673bb6ac99fbcb18aecc')
      @configuration.set(:repository, 'repository')
      @configuration.set(:current_release, '/home/deploy/rails_app/honeybadger')
      io = StringIO.new
      logger = Capistrano::Logger.new(:output => io)
      logger.level = Capistrano::Logger::MAX_LEVEL

      @configuration.logger = logger
      @configuration.find_and_execute_task('honeybadger:deploy')

      expect(io.string).to include '** Notifying Honeybadger of Deploy'
      expect(io.string).to include '** Honeybadger Notification Complete'
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
honeybadger-1.16.7 spec/honeybadger/capistrano_spec.rb
honeybadger-1.16.6 spec/honeybadger/capistrano_spec.rb
honeybadger-1.16.5 spec/honeybadger/capistrano_spec.rb
honeybadger-1.16.4 spec/honeybadger/capistrano_spec.rb
honeybadger-1.16.3 spec/honeybadger/capistrano_spec.rb
honeybadger-1.16.2 spec/honeybadger/capistrano_spec.rb
honeybadger-1.16.1 spec/honeybadger/capistrano_spec.rb
honeybadger-1.16.0 spec/honeybadger/capistrano_spec.rb
honeybadger-1.15.3 spec/honeybadger/capistrano_spec.rb
honeybadger-1.15.2 spec/honeybadger/capistrano_spec.rb
honeybadger-1.15.1 spec/honeybadger/capistrano_spec.rb
honeybadger-1.15.0 spec/honeybadger/capistrano_spec.rb
honeybadger-1.14.0 spec/honeybadger/capistrano_spec.rb
honeybadger-1.13.2 spec/honeybadger/capistrano_spec.rb
honeybadger-1.13.1 spec/honeybadger/capistrano_spec.rb
honeybadger-1.13.0 spec/honeybadger/capistrano_spec.rb
honeybadger-1.12.0.beta3 spec/honeybadger/capistrano_spec.rb
honeybadger-1.12.0.beta2 spec/honeybadger/capistrano_spec.rb
honeybadger-1.11.2 spec/honeybadger/capistrano_spec.rb
honeybadger-1.11.1 spec/honeybadger/capistrano_spec.rb