Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve deprecations #647

Merged
merged 2 commits into from
Jun 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions features/support/jruby.rb

This file was deleted.

18 changes: 5 additions & 13 deletions lib/aruba/api/deprecated.rb
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,7 @@ def assert_exact_output(expected, actual)
def assert_partial_output(expected, actual)
Aruba.platform.deprecated(
'The use of "#assert_partial_output" is deprecated.' \
' Use "expect(command).to have_output /partial/" instead.' \
' There are also special matchers for "stdout" and "stderr"'
' Use "expect(actual).to include_output_string partial" instead.'
)

actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9"
Expand All @@ -792,8 +791,7 @@ def assert_partial_output(expected, actual)
def assert_matching_output(expected, actual)
Aruba.platform.deprecated(
'The use of "#assert_matching_output" is deprecated.' \
' Use "expect(command).to have_output /partial/" instead.' \
' There are also special matchers for "stdout" and "stderr"'
' Use "expect(actual).to match_output partial" instead.'
)

actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9"
Expand All @@ -810,8 +808,7 @@ def assert_matching_output(expected, actual)
def assert_not_matching_output(expected, actual)
Aruba.platform.deprecated(
'The use of "#assert_not_matching_output" is deprecated.' \
' Use "expect(command).not_to have_output /partial/" instead.' \
' There are also special matchers for "stdout" and "stderr"'
' Use "expect(actual).not_to match_output partial" instead.'
)

actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9"
Expand All @@ -828,8 +825,7 @@ def assert_not_matching_output(expected, actual)
def assert_no_partial_output(unexpected, actual)
Aruba.platform.deprecated(
'The use of "#assert_no_partial_output" is deprecated.' \
' Use "expect(command).not_to have_output /partial/" instead.' \
' There are also special matchers for "stdout" and "stderr"'
' Use "expect(actual).not_to include_output_string partial" instead.'
)

actual.force_encoding(unexpected.encoding) if RUBY_VERSION >= "1.9"
Expand All @@ -851,8 +847,7 @@ def assert_no_partial_output(unexpected, actual)
def assert_partial_output_interactive(expected)
Aruba.platform.deprecated(
'The use of "#assert_partial_output_interactive" is deprecated.' \
' Use "expect(last_command_started).to have_output /partial/" instead.' \
' There are also special matchers for "stdout" and "stderr"'
' Use "expect(last_command_started).to have_output an_output_string_including partial" instead.'
)

Aruba.platform.unescape(last_command_started.stdout, aruba.config.keep_ansi).
Expand Down Expand Up @@ -1003,9 +998,6 @@ def stderr_from(cmd)
# @deprecated
#
# Default exit timeout for running commands with aruba
#
# Overwrite this method if you want a different timeout or set
# `@aruba_timeout_seconds`.
def exit_timeout
Aruba.platform.deprecated(
'The use of "#exit_timeout" is deprecated.' \
Expand Down