diff options
-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 |