spec/backend/exec/build_command_spec.rb in specinfra-2.50.4 vs spec/backend/exec/build_command_spec.rb in specinfra-2.51.0

- old
+ new

@@ -44,9 +44,23 @@ it 'should use custom shell' do expect(Specinfra.backend.build_command('test -f /etc/passwd')).to eq '/usr/test\ \&\ spec/bin/sh -c test\ -f\ /etc/passwd' end end + context 'with an interactive shell' do + before do + RSpec.configure {|c| c.interactive_shell = true } + end + + after do + RSpec.configure {|c| c.interactive_shell = nil } + end + + it 'should emulate an interactive shell' do + expect(Specinfra.backend.build_command('test -f /etc/passwd')).to eq '/bin/sh -i -c test\ -f\ /etc/passwd' + end + end + context 'with custom path' do before do RSpec.configure {|c| c.path = '/opt/bin:/opt/foo/bin:$PATH' } end