spec/beaker/host/pswindows_spec.rb in beaker-4.42.0 vs spec/beaker/host/pswindows_spec.rb in beaker-5.0.0
- old
+ new
@@ -1,35 +1,35 @@
require 'spec_helper'
module PSWindows
describe Host do
let(:options) { @options ? @options : {} }
- let(:platform) {
+ let(:platform) do
if @platform
- { :platform => Beaker::Platform.new( @platform) }
+ { :platform => Beaker::Platform.new(@platform) }
else
- { :platform => Beaker::Platform.new( 'windows-vers-arch-extra' ) }
+ { :platform => Beaker::Platform.new('windows-vers-arch-extra') }
end
- }
- let(:host) {
+ end
+ let(:host) do
opts = options.merge(platform)
opts[:is_cygwin] = false
- make_host( 'name', opts )
- }
+ make_host('name', opts)
+ end
describe '#external_copy_base' do
it 'returns previously calculated value if set' do
- external_copy_base_before = host.instance_variable_get( :@external_copy_base )
+ external_copy_base_before = host.instance_variable_get(:@external_copy_base)
test_value = :testn8391
- host.instance_variable_set( :@external_copy_base, test_value )
+ host.instance_variable_set(:@external_copy_base, test_value)
- expect( host ).not_to receive( :execute )
- expect( host.external_copy_base ).to be === test_value
- host.instance_variable_set( :@external_copy_base, external_copy_base_before )
+ expect(host).not_to receive(:execute)
+ expect(host.external_copy_base).to be === test_value
+ host.instance_variable_set(:@external_copy_base, external_copy_base_before)
end
it 'calls the correct command if unset' do
- expect( host ).to receive( :execute ).with( /^for\ .*ALLUSERSPROFILE.*\%\~I$/ )
+ expect(host).to receive(:execute).with(/^for\ .*ALLUSERSPROFILE.*\%\~I$/)
host.external_copy_base
end
end
end
end