Skip to content
代码片段 群组 项目
提交 78719aaa 编辑于 作者: Gabriel Mazetto's avatar Gabriel Mazetto
浏览文件

Add tests for env

上级 5ad263af
No related branches found
No related tags found
无相关合并请求
......@@ -277,6 +277,26 @@
end
end
describe '#env' do
it 'returns content from RAILS_ENV when its defined' do
stub_const('ENV', { 'RAILS_ENV' => 'railstest', 'RACK_ENV' => 'racktest' })
expect(context.env).to eq('railstest')
end
it 'returns content from RACK_ENV when its the next one defined' do
stub_const('ENV', { 'RACK_ENV' => 'racktest' })
expect(context.env).to eq('racktest')
end
it 'returns the default value when no other ENV is defined' do
stub_const('ENV', {})
expect(context.env).to eq('development')
end
end
describe '#gitlab_shared_path' do
context 'with shared path not configured in gitlab.yml' do
it 'raises an error' do
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册