Commit 6609589b authored by Grzegorz Bizon's avatar Grzegorz Bizon

Add ci config global and before_script entries

parent 23030439
module Gitlab
module Ci
class Config
module Entry
class BaseEntry
def initialize(hash, config, parent = nil)
@hash = hash
@config = config
@parent = parent
end
end
end
end
end
end
module Gitlab
module Ci
class Config
module Entry
class BeforeScript < BaseEntry
def leaf?
true
end
end
end
end
end
end
module Gitlab
module Ci
class Config
module Entry
class Global < BaseEntry
def allowed_keys
[]
end
end
end
end
end
end
require 'spec_helper'
describe Gitlab::Ci::Config::Entry::BeforeScript do
let(:entry) { described_class.new(hash, config) }
describe '#leaf?' do
it 'is a leaf entry' do
expect(entry).to be_leaf
end
end
end
require 'spec_helper'
describe Gitlab::Ci::Config::Entry::Global do
end
......@@ -37,7 +37,8 @@ describe Gitlab::Ci::Config do
describe '.new' do
it 'raises error' do
expect { config }.to raise_error(
Gitlab::Ci::Config::LoaderError, /Invalid configuration format/
Gitlab::Ci::Config::LoaderError,
/Invalid configuration format/
)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment