spec/backend/exec/build_command_spec.rb in specinfra-2.0.0.beta9 vs spec/backend/exec/build_command_spec.rb in specinfra-2.0.0.beta10
- old
+ new
@@ -44,32 +44,32 @@
end
end
context 'with custom path' do
before do
- RSpec.configure {|c| c.path = '/opt/bin:/opt/foo/bin' }
+ RSpec.configure {|c| c.path = '/opt/bin:/opt/foo/bin:$PATH' }
end
after do
RSpec.configure {|c| c.path = nil }
end
it 'should use custom path' do
- expect(backend.build_command('test -f /etc/passwd')).to eq 'env PATH=/opt/bin:/opt/foo/bin:"$PATH" /bin/sh -c test\ -f\ /etc/passwd'
+ expect(backend.build_command('test -f /etc/passwd')).to eq 'env PATH="/opt/bin:/opt/foo/bin:$PATH" /bin/sh -c test\ -f\ /etc/passwd'
end
end
context 'with custom path that needs escaping' do
before do
- RSpec.configure {|c| c.path = '/opt/bin:/opt/test & spec/bin' }
+ RSpec.configure {|c| c.path = '/opt/bin:/opt/test & spec/bin:$PATH' }
end
after do
RSpec.configure {|c| c.path = nil }
end
it 'should use custom path' do
- expect(backend.build_command('test -f /etc/passwd')).to eq 'env PATH=/opt/bin:/opt/test\ \&\ spec/bin:"$PATH" /bin/sh -c test\ -f\ /etc/passwd'
+ expect(backend.build_command('test -f /etc/passwd')).to eq 'env PATH="/opt/bin:/opt/test & spec/bin:$PATH" /bin/sh -c test\ -f\ /etc/passwd'
end
end
end
end