summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-07-14 15:45:29 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-07-14 15:45:29 +0200
commit5923741fe690a688591ad36da894b3103954a437 (patch)
tree0033a82df7daf9a0fb5760531a878278dfeb53a0 /spec
parent3e16b015b969a4d5d28240e76bffd382b0772f49 (diff)
downloadgitlab-ce-5923741fe690a688591ad36da894b3103954a437.tar.gz
Remove references to global entry in new CI config
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/ci/config/node/factory_spec.rb8
-rw-r--r--spec/lib/gitlab/ci/config/node/job_spec.rb6
-rw-r--r--spec/lib/gitlab/ci/config/node/jobs_spec.rb3
3 files changed, 4 insertions, 13 deletions
diff --git a/spec/lib/gitlab/ci/config/node/factory_spec.rb b/spec/lib/gitlab/ci/config/node/factory_spec.rb
index bc6bf32ffbf..4e6f2419e13 100644
--- a/spec/lib/gitlab/ci/config/node/factory_spec.rb
+++ b/spec/lib/gitlab/ci/config/node/factory_spec.rb
@@ -5,11 +5,6 @@ describe Gitlab::Ci::Config::Node::Factory do
let(:factory) { described_class.new(node) }
let(:node) { Gitlab::Ci::Config::Node::Script }
let(:parent) { double('parent') }
- let(:global) { double('global') }
-
- before do
- allow(parent).to receive(:global).and_return(global)
- end
context 'when setting a concrete value' do
it 'creates entry with valid value' do
@@ -21,13 +16,12 @@ describe Gitlab::Ci::Config::Node::Factory do
expect(entry.value).to eq ['ls', 'pwd']
end
- it 'sets parent and global attributes' do
+ it 'sets parent attributes' do
entry = factory
.value('ls')
.parent(parent)
.create!
- expect(entry.global).to eq global
expect(entry.parent).to eq parent
end
diff --git a/spec/lib/gitlab/ci/config/node/job_spec.rb b/spec/lib/gitlab/ci/config/node/job_spec.rb
index ee3eea9c27a..4c7ac9949cc 100644
--- a/spec/lib/gitlab/ci/config/node/job_spec.rb
+++ b/spec/lib/gitlab/ci/config/node/job_spec.rb
@@ -1,9 +1,7 @@
require 'spec_helper'
describe Gitlab::Ci::Config::Node::Job do
- let(:entry) { described_class.new(config, attributes) }
- let(:attributes) { { key: :rspec, global: global } }
- let(:global) { double('global', stages: %w[test]) }
+ let(:entry) { described_class.new(config, key: :rspec) }
before do
entry.process!
@@ -21,7 +19,7 @@ describe Gitlab::Ci::Config::Node::Job do
end
context 'when job name is empty' do
- let(:attributes) { { key: '', global: global } }
+ let(:entry) { described_class.new(config, key: ''.to_sym) }
it 'reports error' do
expect(entry.errors)
diff --git a/spec/lib/gitlab/ci/config/node/jobs_spec.rb b/spec/lib/gitlab/ci/config/node/jobs_spec.rb
index 40837b5f857..c4c130abb6d 100644
--- a/spec/lib/gitlab/ci/config/node/jobs_spec.rb
+++ b/spec/lib/gitlab/ci/config/node/jobs_spec.rb
@@ -1,8 +1,7 @@
require 'spec_helper'
describe Gitlab::Ci::Config::Node::Jobs do
- let(:entry) { described_class.new(config, global: global) }
- let(:global) { double('global', before_script: nil, stages: %w[test]) }
+ let(:entry) { described_class.new(config) }
describe 'validations' do
before do