diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-07-05 14:17:09 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-07-05 14:17:09 +0200 |
commit | 6ae80732bb3b503e2d15acb2cab527c17e22e34b (patch) | |
tree | c19a92ba74c2eafcb9e00e9a557c82b2eafb079c /spec/lib | |
parent | e00ae9a87720bccda634dc85c018f5ec1d03a883 (diff) | |
download | gitlab-ce-6ae80732bb3b503e2d15acb2cab527c17e22e34b.tar.gz |
Add ability to define nodes in new CI config entry
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/ci/config/node/global_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/lib/gitlab/ci/config/node/global_spec.rb b/spec/lib/gitlab/ci/config/node/global_spec.rb index 8f2f9e171d1..254cb28190c 100644 --- a/spec/lib/gitlab/ci/config/node/global_spec.rb +++ b/spec/lib/gitlab/ci/config/node/global_spec.rb @@ -31,24 +31,24 @@ describe Gitlab::Ci::Config::Node::Global do before { global.process! } it 'creates nodes hash' do - expect(global.nodes).to be_an Array + expect(global.descendants).to be_an Array end it 'creates node object for each entry' do - expect(global.nodes.count).to eq 9 + expect(global.descendants.count).to eq 9 end it 'creates node object using valid class' do - expect(global.nodes.first) + expect(global.descendants.first) .to be_an_instance_of Gitlab::Ci::Config::Node::Script - expect(global.nodes.second) + expect(global.descendants.second) .to be_an_instance_of Gitlab::Ci::Config::Node::Image end it 'sets correct description for nodes' do - expect(global.nodes.first.description) + expect(global.descendants.first.description) .to eq 'Script that will be executed before each job.' - expect(global.nodes.second.description) + expect(global.descendants.second.description) .to eq 'Docker image that will be used to execute jobs.' end end @@ -139,11 +139,11 @@ describe Gitlab::Ci::Config::Node::Global do describe '#nodes' do it 'instantizes all nodes' do - expect(global.nodes.count).to eq 9 + expect(global.descendants.count).to eq 9 end it 'contains undefined nodes' do - expect(global.nodes.first) + expect(global.descendants.first) .to be_an_instance_of Gitlab::Ci::Config::Node::Undefined end end |