summaryrefslogtreecommitdiff
path: root/spec/support/stub_version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/stub_version.rb')
-rw-r--r--spec/support/stub_version.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/stub_version.rb b/spec/support/stub_version.rb
new file mode 100644
index 00000000000..594ab64e7c6
--- /dev/null
+++ b/spec/support/stub_version.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+module StubVersion
+ def stub_version(version, revision)
+ stub_const('Gitlab::VERSION', version)
+ allow(Gitlab).to receive(:revision).and_return(revision)
+ end
+end