-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c452e91
commit 70e1896
Showing
3 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ group :development do | |
gem 'guard' | ||
gem 'guard-minitest' | ||
gem 'aws-sdk-codedeploy' | ||
gem 'rspec' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe "Egads::Release" do | ||
describe Egads::Release do | ||
subject { Egads::Release } | ||
|
||
let(:sha) { 'abcdef123456' } | ||
let(:options) { { force: false, deployment_id: true } } | ||
let(:release_instance) { subject.new([sha], options) } | ||
|
||
it 'should run the correct tasks' do | ||
_(subject.commands.keys).must_equal %w(setup_environment stage run_before_release_hooks symlink_release restart run_after_release_hooks trim) | ||
expect(subject.commands.keys).to eq %w(setup_environment stage run_before_release_hooks symlink_release restart run_after_release_hooks trim) | ||
end | ||
|
||
it 'should recognize the deployment_id class option' do | ||
expect(release_instance.options[:deployment_id]).to eq true | ||
end | ||
|
||
it 'should correctly pass the deployment_id option to the stage method' do | ||
allow_any_instance_of(Egads::Stage).to receive(:stage).and_call_original | ||
expect(release_instance.options[:deployment_id]).to eq(true) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative 'spec_helper' | ||
|
||
describe "Egads::Stage" do | ||
describe Egads::Stage do | ||
subject { Egads::Stage } | ||
|
||
let(:sha) { 'abcdef123456' } | ||
let(:options) { { force: false, deployment_id: true } } | ||
let(:stage_instance) { subject.new([sha], options) } | ||
|
||
it 'should run the correct tasks' do | ||
_(subject.commands.keys).must_equal %w(setup_environment extract run_before_hooks bundle symlink_system_paths symlink_config_files run_after_stage_hooks mark_as_staged) | ||
expect(subject.commands.keys).to eq %w[setup_environment extract run_before_hooks bundle symlink_system_paths symlink_config_files run_after_stage_hooks mark_as_staged] | ||
end | ||
|
||
it 'should recognize the deployment_id class option' do | ||
expect(stage_instance.options[:deployment_id]).to eq true | ||
end | ||
|
||
it 'should correctly pass the deployment_id option to the stage method' do | ||
allow_any_instance_of(Egads::Stage).to receive(:stage).and_call_original | ||
expect(stage_instance.options[:deployment_id]).to eq(true) | ||
end | ||
end |