Add tests for main CLI commands

This commit is contained in:
Samuel Sieg
2023-03-14 15:58:12 +01:00
parent b668ce3f25
commit 46dad1ee6c
3 changed files with 116 additions and 6 deletions

View File

@@ -9,7 +9,18 @@ require "mrsk"
ActiveSupport::LogSubscriber.logger = ActiveSupport::Logger.new(STDOUT) if ENV["VERBOSE"]
# Applies to remote commands only,
# see https://github.com/capistrano/sshkit/blob/master/lib/sshkit/dsl.rb#L9
SSHKit.config.backend = SSHKit::Backend::Printer
# Ensure local commands use the printer backend too
module SSHKit
module DSL
def run_locally(&block)
SSHKit::Backend::Printer.new(SSHKit::Host.new(:local), &block).run
end
end
end
class ActiveSupport::TestCase
end