test/unit/backends/test_abstract.rb in sshkit-1.19.0 vs test/unit/backends/test_abstract.rb in sshkit-1.19.1
- old
+ new
@@ -97,9 +97,21 @@
backend.run
assert_equal '/usr/bin/env cat file', backend.executed_command.to_command
end
+ def test_within_home
+ backend = ExampleBackend.new do
+ within '~/foo' do
+ execute :cat, 'file', :strip => false
+ end
+ end
+
+ backend.run
+
+ assert_equal 'cd ~/foo && /usr/bin/env cat file', backend.executed_command.to_command
+ end
+
def test_background_logs_deprecation_warnings
deprecation_out = ''
SSHKit.config.deprecation_output = deprecation_out
ExampleBackend.new do