Sha256: adba7a69e3c6b5cf431ca614122b389a46c34bdce8ba6bb0e65f40a83b6c56ab
Contents?: true
Size: 1.49 KB
Versions: 5
Compression:
Stored size: 1.49 KB
Contents
require File.dirname(__FILE__) + '/spec_helper' class TestRestartDeploy < EY::Deploy attr_reader :call_order def initialize(*a) super @call_order = [] end def require_custom_tasks() @call_order << 'require_custom_tasks' end def restart() @call_order << 'restart' end def enable_maintenance_page() @call_order << 'enable_maintenance_page' end def disable_maintenance_page() @call_order << 'disable_maintenance_page' end end describe "EY::Deploy#restart_with_maintenance_page" do class TestRestartWithMaintenancePage < TestRestartDeploy def conditionally_enable_maintenance_page() @call_order << 'conditionally_enable_maintenance_page' end end it "puts up the maintenance page if necessary, restarts, and takes down the maintenance page" do deployer = TestRestartWithMaintenancePage.new(EY::Deploy::Configuration.new) deployer.restart_with_maintenance_page deployer.call_order.should == %w( require_custom_tasks conditionally_enable_maintenance_page restart disable_maintenance_page ) end end describe "glassfish stack" do it "requires a maintenance page" do config = EY::Deploy::Configuration.new(:stack => 'glassfish') deployer = TestRestartDeploy.new(config) deployer.restart_with_maintenance_page deployer.call_order.should include('enable_maintenance_page') end end
Version data entries
5 entries across 5 versions & 1 rubygems