diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-17 09:06:55 -0400 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-04-17 09:06:55 -0400 |
commit | 5a7e4dfd3362d08c856fdfcf4b82584c2cac169f (patch) | |
tree | 4e87f3beab05ea24fb2ad7368ceb3c31d3a0b666 /spec/lib | |
parent | 4cc9a02ee033564b62b45977571319d129df465b (diff) | |
parent | a0afeefd76ebfacae59343f48e127828b27ba77a (diff) | |
download | gitlab-ce-5a7e4dfd3362d08c856fdfcf4b82584c2cac169f.tar.gz |
Merge branch 'after-script' into make-before-after-overridable
* after-script:
Add CHANGELOG and documentation
Rename finally_script to after_script
Conflicts:
lib/ci/gitlab_ci_yaml_processor.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index a6a1a5e3bef..21ec2785559 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -333,30 +333,30 @@ module Ci end end - describe "finally_script" do + describe "after_script" do context "in global context" do let(:config) { { - finally_script: ["finally_script"], + after_script: ["after_script"], test: { script: ["script"] } } } - it "return finally_script in options" do - expect(subject[:options][:finally_script]).to eq(["finally_script"]) + it "return after_script in options" do + expect(subject[:options][:after_script]).to eq(["after_script"]) end end context "overwritten in local context" do let(:config) { { - finally_script: ["local finally_script"], - test: { finally_script: ["local finally_script"], script: ["script"] } + after_script: ["local after_script"], + test: { after_script: ["local after_script"], script: ["script"] } } } - it "return finally_script in options" do - expect(subject[:options][:finally_script]).to eq(["local finally_script"]) + it "return after_script in options" do + expect(subject[:options][:after_script]).to eq(["local after_script"]) end end end @@ -689,18 +689,18 @@ EOT end.to raise_error(GitlabCiYamlProcessor::ValidationError, "rspec job: before_script should be an array of strings") end - it "returns errors if finally_script parameter is invalid" do - config = YAML.dump({ finally_script: "bundle update", rspec: { script: "test" } }) + it "returns errors if after_script parameter is invalid" do + config = YAML.dump({ after_script: "bundle update", rspec: { script: "test" } }) expect do GitlabCiYamlProcessor.new(config, path) - end.to raise_error(GitlabCiYamlProcessor::ValidationError, "finally_script should be an array of strings") + end.to raise_error(GitlabCiYamlProcessor::ValidationError, "after_script should be an array of strings") end - it "returns errors if job finally_script parameter is not an array of strings" do - config = YAML.dump({ rspec: { script: "test", finally_script: [10, "test"] } }) + it "returns errors if job after_script parameter is not an array of strings" do + config = YAML.dump({ rspec: { script: "test", after_script: [10, "test"] } }) expect do GitlabCiYamlProcessor.new(config, path) - end.to raise_error(GitlabCiYamlProcessor::ValidationError, "rspec job: finally_script should be an array of strings") + end.to raise_error(GitlabCiYamlProcessor::ValidationError, "rspec job: after_script should be an array of strings") end it "returns errors if image parameter is invalid" do |