Sha256: 48a641f3bdadd620b12cdb875ab55c1f2e8caa0e3ef53e803a112df5294a10ff
Contents?: true
Size: 1.53 KB
Versions: 1
Compression:
Stored size: 1.53 KB
Contents
@no-clobber Feature: vagrant-exec directory In order to change the working directory For commands I execute using vagrant-exec As a user I should be able to specify it in Vagrantfile Scenario: uses /vagrant as default directory Given I write to "Vagrantfile" with: """ Vagrant.configure('2') do |config| config.vm.box = 'vagrant_exec' end """ Given I run `bundle exec vagrant up` When I run `bundle exec vagrant exec pwd` Then the exit status should be 0 And SHH subprocess should execute command "cd /vagrant && pwd" Scenario: can use custom directory for all commands Given I write to "Vagrantfile" with: """ Vagrant.configure('2') do |config| config.vm.box = 'vagrant_exec' config.exec.commands '*', directory: '/tmp' end """ And I run `bundle exec vagrant up` When I run `bundle exec vagrant exec pwd` Then the exit status should be 0 And SHH subprocess should execute command "cd /tmp && pwd" Scenario: can use custom directory for specific commands Given I write to "Vagrantfile" with: """ Vagrant.configure('2') do |config| config.vm.box = 'vagrant_exec' config.exec.commands %w(pwd echo), directory: '/tmp' end """ And I run `bundle exec vagrant up` When I run `bundle exec vagrant exec echo 1` Then SHH subprocess should execute command "cd /tmp && echo 1" When I run `bundle exec vagrant exec env` Then SHH subprocess should execute command "cd /vagrant && env"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-exec-0.4.1 | features/vagrant-exec/directory.feature |