(rubocop) Fix Layout/SpaceInsideLiteralHashBraces

This commit is contained in:
Tim Sharpe 2019-02-03 12:32:05 +11:00
parent eb0d31260f
commit b8971c040a
6 changed files with 28 additions and 28 deletions

View file

@ -21,7 +21,7 @@ class Http
url = "https://#{url}" unless is_url(url) url = "https://#{url}" unless is_url(url)
conn = Faraday.new(:url => url, :ssl => {:verify => false}) do |faraday| conn = Faraday.new(:url => url, :ssl => { :verify => false }) do |faraday|
faraday.request :url_encoded faraday.request :url_encoded
faraday.response :logger if verbose faraday.response :logger if verbose
faraday.adapter Faraday.default_adapter faraday.adapter Faraday.default_adapter
@ -37,7 +37,7 @@ class Http
url = "https://#{url}" unless is_url(url) url = "https://#{url}" unless is_url(url)
conn = Faraday.new(:url => url, :ssl => {:verify => false}) do |faraday| conn = Faraday.new(:url => url, :ssl => { :verify => false }) do |faraday|
faraday.request :url_encoded faraday.request :url_encoded
faraday.request :basic_auth, user, password faraday.request :basic_auth, user, password
faraday.response :logger if verbose faraday.response :logger if verbose

View file

@ -16,7 +16,7 @@ describe Pooler do
it 'returns a token from vmpooler' do it 'returns a token from vmpooler' do
stub_request(:post, 'https://first.last:password@vmpooler.example.com/token'). stub_request(:post, 'https://first.last:password@vmpooler.example.com/token').
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(:status => 200, :body => @get_token_response, :headers => {}) to_return(:status => 200, :body => @get_token_response, :headers => {})
token = Auth.get_token(false, @vmpooler_url, 'first.last', 'password') token = Auth.get_token(false, @vmpooler_url, 'first.last', 'password')
@ -25,7 +25,7 @@ describe Pooler do
it 'raises a token error if something goes wrong' do it 'raises a token error if something goes wrong' do
stub_request(:post, 'https://first.last:password@vmpooler.example.com/token'). stub_request(:post, 'https://first.last:password@vmpooler.example.com/token').
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(:status => 500, :body => '{"ok":false}', :headers => {}) to_return(:status => 500, :body => '{"ok":false}', :headers => {})
expect{ Auth.get_token(false, @vmpooler_url, 'first.last', 'password') }.to raise_error(TokenError) expect{ Auth.get_token(false, @vmpooler_url, 'first.last', 'password') }.to raise_error(TokenError)
@ -40,7 +40,7 @@ describe Pooler do
it 'deletes the specified token' do it 'deletes the specified token' do
stub_request(:delete, 'https://first.last:password@vmpooler.example.com/token/utpg2i2xswor6h8ttjhu3d47z53yy47y'). stub_request(:delete, 'https://first.last:password@vmpooler.example.com/token/utpg2i2xswor6h8ttjhu3d47z53yy47y').
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(:status => 200, :body => @delete_token_response, :headers => {}) to_return(:status => 200, :body => @delete_token_response, :headers => {})
expect(Auth.delete_token(false, @vmpooler_url, 'first.last', 'password', @token)).to eq JSON.parse(@delete_token_response) expect(Auth.delete_token(false, @vmpooler_url, 'first.last', 'password', @token)).to eq JSON.parse(@delete_token_response)
@ -48,7 +48,7 @@ describe Pooler do
it 'raises a token error if something goes wrong' do it 'raises a token error if something goes wrong' do
stub_request(:delete, 'https://first.last:password@vmpooler.example.com/token/utpg2i2xswor6h8ttjhu3d47z53yy47y'). stub_request(:delete, 'https://first.last:password@vmpooler.example.com/token/utpg2i2xswor6h8ttjhu3d47z53yy47y').
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(:status => 500, :body => '{"ok":false}', :headers => {}) to_return(:status => 500, :body => '{"ok":false}', :headers => {})
expect{ Auth.delete_token(false, @vmpooler_url, 'first.last', 'password', @token) }.to raise_error(TokenError) expect{ Auth.delete_token(false, @vmpooler_url, 'first.last', 'password', @token) }.to raise_error(TokenError)
@ -67,7 +67,7 @@ describe Pooler do
it 'checks the status of a token' do it 'checks the status of a token' do
stub_request(:get, "#{@vmpooler_url}/token/utpg2i2xswor6h8ttjhu3d47z53yy47y"). stub_request(:get, "#{@vmpooler_url}/token/utpg2i2xswor6h8ttjhu3d47z53yy47y").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(:status => 200, :body => @token_status_response, :headers => {}) to_return(:status => 200, :body => @token_status_response, :headers => {})
expect(Auth.token_status(false, @vmpooler_url, @token)).to eq JSON.parse(@token_status_response) expect(Auth.token_status(false, @vmpooler_url, @token)).to eq JSON.parse(@token_status_response)
@ -75,7 +75,7 @@ describe Pooler do
it 'raises a token error if something goes wrong' do it 'raises a token error if something goes wrong' do
stub_request(:get, "#{@vmpooler_url}/token/utpg2i2xswor6h8ttjhu3d47z53yy47y"). stub_request(:get, "#{@vmpooler_url}/token/utpg2i2xswor6h8ttjhu3d47z53yy47y").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(:status => 500, :body => '{"ok":false}', :headers => {}) to_return(:status => 500, :body => '{"ok":false}', :headers => {})
expect{ Auth.token_status(false, @vmpooler_url, @token) }.to raise_error(TokenError) expect{ Auth.token_status(false, @vmpooler_url, @token) }.to raise_error(TokenError)

View file

@ -175,8 +175,8 @@ BODY
it 'raises an error if the user tries to modify an unsupported attribute' do it 'raises an error if the user tries to modify an unsupported attribute' do
stub_request(:put, 'https://nspooler.example.com/host/myfakehost'). stub_request(:put, 'https://nspooler.example.com/host/myfakehost').
with(:body => {'{}' => true}, with(:body => { '{}' => true },
:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'token-value'}). :headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'token-value' }).
to_return(:status => 200, :body => '', :headers => {}) to_return(:status => 200, :body => '', :headers => {})
details = { :lifetime => 12 } details = { :lifetime => 12 }
expect { NonstandardPooler.modify(false, @nspooler_url, 'myfakehost', 'token-value', details) } expect { NonstandardPooler.modify(false, @nspooler_url, 'myfakehost', 'token-value', details) }

View file

@ -48,7 +48,7 @@ describe Pooler do
it 'raises an AuthError if the token is invalid' do it 'raises an AuthError if the token is invalid' do
stub_request(:post, "#{@vmpooler_url}/vm/debian-7-i386"). stub_request(:post, "#{@vmpooler_url}/vm/debian-7-i386").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile' }).
to_return(:status => 401, :body => '{"ok":false}', :headers => {}) to_return(:status => 401, :body => '{"ok":false}', :headers => {})
vm_hash = {} vm_hash = {}
@ -58,7 +58,7 @@ describe Pooler do
it 'retrieves a single vm with a token' do it 'retrieves a single vm with a token' do
stub_request(:post, "#{@vmpooler_url}/vm/debian-7-i386"). stub_request(:post, "#{@vmpooler_url}/vm/debian-7-i386").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile' }).
to_return(:status => 200, :body => @retrieve_response_body_single, :headers => {}) to_return(:status => 200, :body => @retrieve_response_body_single, :headers => {})
vm_hash = {} vm_hash = {}
@ -71,7 +71,7 @@ describe Pooler do
it 'retrieves a multiple vms with a token' do it 'retrieves a multiple vms with a token' do
stub_request(:post, "#{@vmpooler_url}/vm/debian-7-i386+debian-7-i386+centos-7-x86_64"). stub_request(:post, "#{@vmpooler_url}/vm/debian-7-i386+debian-7-i386+centos-7-x86_64").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile' }).
to_return(:status => 200, :body => @retrieve_response_body_double, :headers => {}) to_return(:status => 200, :body => @retrieve_response_body_double, :headers => {})
vm_hash = {} vm_hash = {}
@ -99,8 +99,8 @@ describe Pooler do
it 'modifies the TTL of a vm' do it 'modifies the TTL of a vm' do
modify_hash = { :lifetime => 12 } modify_hash = { :lifetime => 12 }
stub_request(:put, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6"). stub_request(:put, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6").
with(:body => {'{"lifetime":12}' => true}, with(:body => { '{"lifetime":12}' => true },
:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile'}). :headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type' => 'application/x-www-form-urlencoded', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile' }).
to_return(:status => 200, :body => @modify_response_body_success, :headers => {}) to_return(:status => 200, :body => @modify_response_body_success, :headers => {})
modify_req = Pooler.modify(false, @vmpooler_url, 'fq6qlpjlsskycq6', 'mytokenfile', modify_hash) modify_req = Pooler.modify(false, @vmpooler_url, 'fq6qlpjlsskycq6', 'mytokenfile', modify_hash)
@ -111,12 +111,12 @@ describe Pooler do
describe '#delete' do describe '#delete' do
before :each do before :each do
@delete_response_body_success = '{"ok":true}' @delete_response_body_success = '{"ok":true}'
@delete_response = {'fq6qlpjlsskycq6' => {'ok' => true}} @delete_response = { 'fq6qlpjlsskycq6' => { 'ok' => true } }
end end
it 'deletes a specified vm' do it 'deletes a specified vm' do
stub_request(:delete, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6"). stub_request(:delete, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile' }).
to_return(:status => 200, :body => @delete_response_body_success, :headers => {}) to_return(:status => 200, :body => @delete_response_body_success, :headers => {})
expect(Pooler.delete(false, @vmpooler_url, ['fq6qlpjlsskycq6'], 'mytokenfile')).to eq @delete_response expect(Pooler.delete(false, @vmpooler_url, ['fq6qlpjlsskycq6'], 'mytokenfile')).to eq @delete_response
@ -135,7 +135,7 @@ describe Pooler do
it 'prints the status' do it 'prints the status' do
stub_request(:get, "#{@vmpooler_url}/status"). stub_request(:get, "#{@vmpooler_url}/status").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(:status => 200, :body => @status_response_body, :headers => {}) to_return(:status => 200, :body => @status_response_body, :headers => {})
status = Pooler.status(false, @vmpooler_url) status = Pooler.status(false, @vmpooler_url)
@ -159,7 +159,7 @@ describe Pooler do
it 'makes a query about a vm' do it 'makes a query about a vm' do
stub_request(:get, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6"). stub_request(:get, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(:status => 200, :body => @query_response_body, :headers => {}) to_return(:status => 200, :body => @query_response_body, :headers => {})
query_req = Pooler.query(false, @vmpooler_url, 'fq6qlpjlsskycq6') query_req = Pooler.query(false, @vmpooler_url, 'fq6qlpjlsskycq6')
@ -174,7 +174,7 @@ describe Pooler do
it 'makes a snapshot for a single vm' do it 'makes a snapshot for a single vm' do
stub_request(:post, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6/snapshot"). stub_request(:post, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6/snapshot").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile' }).
to_return(:status => 200, :body => @snapshot_response_body, :headers => {}) to_return(:status => 200, :body => @snapshot_response_body, :headers => {})
snapshot_req = Pooler.snapshot(false, @vmpooler_url, 'fq6qlpjlsskycq6', 'mytokenfile') snapshot_req = Pooler.snapshot(false, @vmpooler_url, 'fq6qlpjlsskycq6', 'mytokenfile')
@ -189,7 +189,7 @@ describe Pooler do
it 'makes a request to revert a vm from a snapshot' do it 'makes a request to revert a vm from a snapshot' do
stub_request(:post, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6/snapshot/dAfewKNfaweLKNve"). stub_request(:post, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6/snapshot/dAfewKNfaweLKNve").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile'}). with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile' }).
to_return(:status => 200, :body => @revert_response_body, :headers => {}) to_return(:status => 200, :body => @revert_response_body, :headers => {})
revert_req = Pooler.revert(false, @vmpooler_url, 'fq6qlpjlsskycq6', 'mytokenfile', 'dAfewKNfaweLKNve') revert_req = Pooler.revert(false, @vmpooler_url, 'fq6qlpjlsskycq6', 'mytokenfile', 'dAfewKNfaweLKNve')
@ -213,7 +213,7 @@ describe Pooler do
it 'makes a request to extend disk space of a vm' do it 'makes a request to extend disk space of a vm' do
stub_request(:post, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6/disk/12"). stub_request(:post, "#{@vmpooler_url}/vm/fq6qlpjlsskycq6/disk/12").
with(:headers => {'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile'}). to_return(:status => 200, :body => @disk_response_body_success, :headers => {}) with(:headers => { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Length' => '0', 'User-Agent' => 'Faraday v0.9.2', 'X-Auth-Token' => 'mytokenfile' }). to_return(:status => 200, :body => @disk_response_body_success, :headers => {})
disk_req = Pooler.disk(false, @vmpooler_url, 'fq6qlpjlsskycq6', 'mytokenfile', 12) disk_req = Pooler.disk(false, @vmpooler_url, 'fq6qlpjlsskycq6', 'mytokenfile', 12)
expect(disk_req['ok']).to be true expect(disk_req['ok']).to be true

View file

@ -7,7 +7,7 @@ describe Service do
describe '#initialize' do describe '#initialize' do
it 'store configuration options' do it 'store configuration options' do
options = MockOptions.new({}) options = MockOptions.new({})
config = {'url' => 'http://example.url'} config = { 'url' => 'http://example.url' }
service = Service.new(options, config) service = Service.new(options, config)
expect(service.config).to include config expect(service.config).to include config
end end

View file

@ -141,7 +141,7 @@ describe Utils do
describe '#generate_os_hash' do describe '#generate_os_hash' do
before :each do before :each do
@host_hash = {'centos' => 1, 'debian' => 5, 'windows' => 1} @host_hash = { 'centos' => 1, 'debian' => 5, 'windows' => 1 }
end end
it 'takes an array of os arguments and returns a formatted hash' do it 'takes an array of os arguments and returns a formatted hash' do
@ -167,7 +167,7 @@ describe Utils do
'state' => 'running', 'state' => 'running',
'ip' => '127.0.0.1', 'ip' => '127.0.0.1',
'domain' => 'delivery.mycompany.net', 'domain' => 'delivery.mycompany.net',
}} } }
output = '- mcpy42eqjxli9g2.delivery.mycompany.net (ubuntu-1604-x86_64, 9.66/12 hours)' output = '- mcpy42eqjxli9g2.delivery.mycompany.net (ubuntu-1604-x86_64, 9.66/12 hours)'
expect(Utils).to receive(:puts).with(output) expect(Utils).to receive(:puts).with(output)
@ -193,7 +193,7 @@ describe Utils do
}, },
'ip' => '127.0.0.1', 'ip' => '127.0.0.1',
'domain' => 'delivery.mycompany.net', 'domain' => 'delivery.mycompany.net',
}} } }
output = '- aiydvzpg23r415q.delivery.mycompany.net (redhat-7-x86_64, 7.67/48 hours, user: bob, role: agent)' output = '- aiydvzpg23r415q.delivery.mycompany.net (redhat-7-x86_64, 7.67/48 hours, user: bob, role: agent)'
expect(Utils).to receive(:puts).with(output) expect(Utils).to receive(:puts).with(output)
@ -214,7 +214,7 @@ describe Utils do
'reserved_by_user' => 'first.last', 'reserved_by_user' => 'first.last',
'reserved_for_reason' => '', 'reserved_for_reason' => '',
'hours_left_on_reservation' => 35.89, 'hours_left_on_reservation' => 35.89,
}} } }
output = '- sol11-9.delivery.mycompany.net (solaris-11-sparc, 35.89h remaining)' output = '- sol11-9.delivery.mycompany.net (solaris-11-sparc, 35.89h remaining)'
expect(Utils).to receive(:puts).with(output) expect(Utils).to receive(:puts).with(output)
@ -235,7 +235,7 @@ describe Utils do
'reserved_by_user' => 'first.last', 'reserved_by_user' => 'first.last',
'reserved_for_reason' => 'testing', 'reserved_for_reason' => 'testing',
'hours_left_on_reservation' => 35.89, 'hours_left_on_reservation' => 35.89,
}} } }
output = '- sol11-9.delivery.mycompany.net (solaris-11-sparc, 35.89h remaining, reason: testing)' output = '- sol11-9.delivery.mycompany.net (solaris-11-sparc, 35.89h remaining, reason: testing)'
expect(Utils).to receive(:puts).with(output) expect(Utils).to receive(:puts).with(output)