diff --git a/spec/lib/dip/commands/ssh_spec.rb b/spec/lib/dip/commands/ssh_spec.rb index 496ecac..1f8397c 100644 --- a/spec/lib/dip/commands/ssh_spec.rb +++ b/spec/lib/dip/commands/ssh_spec.rb @@ -7,10 +7,10 @@ describe Dip::Commands::SSH do let(:cli) { Dip::CLI::SSH } - describe Dip::Commands::SSH::Up do - context "when without arguments", env: true do - let(:env) { {"HOME" => "/user"} } + describe Dip::Commands::SSH::Up, env: true do + let(:env) { {"HOME" => "/user"} } + context "when without arguments" do before { cli.start "up".shellsplit } it { expected_subprocess("docker", "volume create --name ssh_data") } @@ -25,7 +25,7 @@ before { cli.start "up --key /foo/bar-baz-rsa".shellsplit } it { expected_subprocess("docker", - "run --rm --volume ssh_data:/ssh --volume /root:/root --interactive --tty whilp/ssh-agent ssh-add /foo/bar-baz-rsa") + "run --rm --volume ssh_data:/ssh --volume /user:/user --interactive --tty whilp/ssh-agent ssh-add /foo/bar-baz-rsa") } end @@ -33,7 +33,7 @@ before { cli.start "up --volume /foo/.ssh".shellsplit } it { expected_subprocess("docker", - "run --rm --volume ssh_data:/ssh --volume /foo/.ssh:/foo/.ssh --interactive --tty whilp/ssh-agent ssh-add /root/.ssh/id_rsa") + "run --rm --volume ssh_data:/ssh --volume /foo/.ssh:/foo/.ssh --interactive --tty whilp/ssh-agent ssh-add /user/.ssh/id_rsa") } end