Commit 5292d833 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Resolve conflicts in `utils` and `utils_spec`

parent 403a4d7e
...@@ -43,7 +43,10 @@ module Gitlab ...@@ -43,7 +43,10 @@ module Gitlab
end end
end end
<<<<<<< HEAD def random_string
Random.rand(Float::MAX.to_i).to_s(36)
end
# EE below # EE below
def try_megabytes_to_bytes(size) def try_megabytes_to_bytes(size)
Integer(size).megabytes Integer(size).megabytes
...@@ -66,10 +69,6 @@ module Gitlab ...@@ -66,10 +69,6 @@ module Gitlab
end end
nil nil
=======
def random_string
Random.rand(Float::MAX.to_i).to_s(36)
>>>>>>> ce-com/master
end end
end end
end end
...@@ -17,9 +17,6 @@ describe Gitlab::Utils do ...@@ -17,9 +17,6 @@ describe Gitlab::Utils do
end end
end end
# EE
delegate :which, to: :described_class
describe '.to_boolean' do describe '.to_boolean' do
it 'accepts booleans' do it 'accepts booleans' do
expect(to_boolean(true)).to be(true) expect(to_boolean(true)).to be(true)
...@@ -57,18 +54,20 @@ describe Gitlab::Utils do ...@@ -57,18 +54,20 @@ describe Gitlab::Utils do
end end
end end
<<<<<<< HEAD describe '.random_string' do
it 'generates a string' do
expect(random_string).to be_kind_of(String)
end
end
# EE # EE
delegate :which, to: :described_class
describe '.which' do describe '.which' do
it 'finds the full path to an executable binary' do it 'finds the full path to an executable binary' do
expect(File).to receive(:executable?).with('/bin/sh').and_return(true) expect(File).to receive(:executable?).with('/bin/sh').and_return(true)
expect(which('sh', 'PATH' => '/bin')).to eq('/bin/sh') expect(which('sh', 'PATH' => '/bin')).to eq('/bin/sh')
=======
describe '.random_string' do
it 'generates a string' do
expect(random_string).to be_kind_of(String)
>>>>>>> ce-com/master
end end
end end
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