diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-22 10:44:33 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-22 10:44:33 +0200 |
commit | 04ecfca386b70800d3876d3f11ff7451e95d9087 (patch) | |
tree | 42b78f0ae6989dedc9b8bc948bd1a81440b6599e /spec/lib | |
parent | 97ec24f0b07d78dee1fa079479abc3b8ddf2e844 (diff) | |
download | gitlab-ce-04ecfca386b70800d3876d3f11ff7451e95d9087.tar.gz |
Rename CI config null node entry to undefined node
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/ci/config/node/factory_spec.rb | 6 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/config/node/undefined_spec.rb (renamed from spec/lib/gitlab/ci/config/node/null_spec.rb) | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/spec/lib/gitlab/ci/config/node/factory_spec.rb b/spec/lib/gitlab/ci/config/node/factory_spec.rb index 10462db7699..8e13e243d4d 100644 --- a/spec/lib/gitlab/ci/config/node/factory_spec.rb +++ b/spec/lib/gitlab/ci/config/node/factory_spec.rb @@ -45,14 +45,14 @@ describe Gitlab::Ci::Config::Node::Factory do end end - context 'when creating a null entry' do + context 'when creating undefined entry' do it 'creates a null entry' do entry = factory .with(value: nil) - .nullify! + .undefine! .create! - expect(entry).to be_an_instance_of Gitlab::Ci::Config::Node::Null + expect(entry).to be_an_instance_of Gitlab::Ci::Config::Node::Undefined end end end diff --git a/spec/lib/gitlab/ci/config/node/null_spec.rb b/spec/lib/gitlab/ci/config/node/undefined_spec.rb index 36101c62462..2d01a8a6ec8 100644 --- a/spec/lib/gitlab/ci/config/node/null_spec.rb +++ b/spec/lib/gitlab/ci/config/node/undefined_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -describe Gitlab::Ci::Config::Node::Null do - let(:entry) { described_class.new(nil) } +describe Gitlab::Ci::Config::Node::Undefined do + let(:entry) { described_class.new('some value') } describe '#leaf?' do it 'is leaf node' do @@ -16,8 +16,8 @@ describe Gitlab::Ci::Config::Node::Null do end describe '#value' do - it 'returns nil' do - expect(entry.value).to be nil + it 'returns configured value' do + expect(entry.value).to eq 'some value' end end end |