diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-04-01 12:07:50 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-04-01 14:37:54 +1300 |
commit | 5cd63ace04deee2e6d7c13694bfd8dc46d0edaf4 (patch) | |
tree | f97c002dcd6149650bc3c1d8300b51b8040092fe /spec | |
parent | 3a1a12b3833e28323347b1021a845a4d85beb563 (diff) | |
download | gitlab-ce-5cd63ace04deee2e6d7c13694bfd8dc46d0edaf4.tar.gz |
Don't modify String in instance_configuration_spec
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/instance_configuration_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/instance_configuration_spec.rb b/spec/models/instance_configuration_spec.rb index dd944c43552..e65f97df3c3 100644 --- a/spec/models/instance_configuration_spec.rb +++ b/spec/models/instance_configuration_spec.rb @@ -32,8 +32,8 @@ describe InstanceConfiguration do end def stub_pub_file(exist: true) - path = 'spec/fixtures/ssh_host_example_key.pub' - path << 'random' unless exist + path = exist ? 'spec/fixtures/ssh_host_example_key.pub' : 'spec/fixtures/ssh_host_example_key.pub.random' + allow(subject).to receive(:ssh_algorithm_file).and_return(Rails.root.join(path)) end end |