summaryrefslogtreecommitdiff
path: root/spec/views
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-05-24 09:57:54 +0200
committerRémy Coutable <remy@rymai.me>2018-05-24 10:14:01 +0200
commitd50a80a282b2ca145841774f4be154a977cccfd8 (patch)
treeb8b44017967ecb99196ec5cfcf4b827af0af1b8a /spec/views
parentc52db71e36ee70c4c5be80b029cf4362f28e3667 (diff)
downloadgitlab-ce-d50a80a282b2ca145841774f4be154a977cccfd8.tar.gz
Replace Gitlab::REVISION with Gitlab.revision and handle installations without a .git directory46600-fix-gitlab-revision-when-not-in-git-repo
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/admin/dashboard/index.html.haml_spec.rb2
-rw-r--r--spec/views/help/index.html.haml_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/views/admin/dashboard/index.html.haml_spec.rb b/spec/views/admin/dashboard/index.html.haml_spec.rb
index 099baacf019..59c777ea338 100644
--- a/spec/views/admin/dashboard/index.html.haml_spec.rb
+++ b/spec/views/admin/dashboard/index.html.haml_spec.rb
@@ -22,6 +22,6 @@ describe 'admin/dashboard/index.html.haml' do
it "includes revision of GitLab" do
render
- expect(rendered).to have_content "#{Gitlab::VERSION} (#{Gitlab::REVISION})"
+ expect(rendered).to have_content "#{Gitlab::VERSION} (#{Gitlab.revision})"
end
end
diff --git a/spec/views/help/index.html.haml_spec.rb b/spec/views/help/index.html.haml_spec.rb
index 0a78606171d..836d452304c 100644
--- a/spec/views/help/index.html.haml_spec.rb
+++ b/spec/views/help/index.html.haml_spec.rb
@@ -39,7 +39,7 @@ describe 'help/index' do
def stub_version(version, revision)
stub_const('Gitlab::VERSION', version)
- stub_const('Gitlab::REVISION', revision)
+ allow(Gitlab).to receive(:revision).and_return(revision)
end
def stub_helpers