Skip to content

Commit

Permalink
Try gating
Browse files Browse the repository at this point in the history
  • Loading branch information
npezza93 committed Oct 10, 2024
1 parent 22aa292 commit 33b72e0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
7 changes: 6 additions & 1 deletion test/unit/backends/test_abstract.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,12 @@ def test_within_home
end

def test_background_logs_deprecation_warnings
deprecation_out = +''
deprecation_out =
if RUBY_VERSION < "2.2"
''
else
+''
end
SSHKit.config.deprecation_output = deprecation_out

ExampleBackend.new do
Expand Down
8 changes: 7 additions & 1 deletion test/unit/test_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,13 @@ def test_on_stderr
end

def test_deprecated_stdtream_accessors
deprecation_out = +''
deprecation_out =
if RUBY_VERSION < "2.2"
''
else
+''
end

SSHKit.config.deprecation_output = deprecation_out

c = Command.new(:whoami)
Expand Down
8 changes: 7 additions & 1 deletion test/unit/test_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ def setup
end

def test_deprecation_output
output = +''
output =
if RUBY_VERSION < "2.2"
''
else
+''
end

SSHKit.config.deprecation_output = output
SSHKit.config.deprecation_logger.log('Test')
assert_equal "[Deprecated] Test\n", output.lines.first
Expand Down

0 comments on commit 33b72e0

Please sign in to comment.