Sha256: cc865f7b4d63c5c80be7224f06f0d662ad7ad5a64f3e60648451fa10f6f90cae
Contents?: true
Size: 1.14 KB
Versions: 4
Compression:
Stored size: 1.14 KB
Contents
require File.expand_path '../helper', __FILE__ require 'capistrano/configuration' require 'projectlocker_errata/capistrano' class CapistranoTest < Test::Unit::TestCase def setup super reset_config @configuration = Capistrano::Configuration.new ProjectlockerErrata::Capistrano.load_into(@configuration) @configuration.dry_run = true end should "define projectlocker_errata:deploy task" do assert_not_nil @configuration.find_task('projectlocker_errata:deploy') end should "log when calling projectlocker_errata:deploy task" do @configuration.set(:current_revision, '084505b1c0e0bcf1526e673bb6ac99fbcb18aecc') @configuration.set(:repository, 'repository') @configuration.set(:current_release, '/home/deploy/rails_app/hoptoad') io = StringIO.new logger = Capistrano::Logger.new(:output => io) logger.level = Capistrano::Logger::MAX_LEVEL @configuration.logger = logger @configuration.find_and_execute_task('projectlocker_errata:deploy') assert io.string.include?('** Notifying ProjectlockerErrata of Deploy') assert io.string.include?('** ProjectlockerErrata Notification Complete') end end
Version data entries
4 entries across 4 versions & 1 rubygems