Sha256: 9c552d7cc8fcfd9cc86140f93e21f8f9010e88d27b478a8c6dbc026fcce3a700
Contents?: true
Size: 1.04 KB
Versions: 36
Compression:
Stored size: 1.04 KB
Contents
describe 'deploy executable' do # Setup a platform for deploy tests # # Parameters:: # * Proc: Code called when the platform is setup # * Parameters:: # * *repository* (String): Platform's repository def with_test_platform_for_deploy with_test_platform({ nodes: { 'node' => {} } }) do |repository| yield repository end end it 'deploys a given node' do with_test_platform_for_deploy do expect(test_deployer).to receive(:deploy_on).with(['node']) do expect(test_deployer.use_why_run).to eq false test_deployer.stdout_device << "Deploy ok\n" { 'node' => [0, "Deploy ok\n", ''] } end exit_code, stdout, stderr = run 'deploy', '--node', 'node' expect(exit_code).to eq 0 expect(stdout).to match /Deploy ok/ expect(stderr).to eq '' end end it 'fails if no node is given' do with_test_platform_for_deploy do expect { run 'deploy' }.to raise_error(RuntimeError, 'No node selected. Please use --node option to set at least one.') end end end
Version data entries
36 entries across 36 versions & 1 rubygems