Skip to content

Deprecate assert_select* in preparation for rename #91

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

Merged
merged 1 commit into from
Feb 16, 2021
Merged
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
3 changes: 3 additions & 0 deletions lib/rails/dom/testing/assertions/selector_assertions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def assert_select(*args, &block)
nest_selection(matches, &block) if block_given? && !matches.empty?
end
end
deprecate assert_select: "assert_select will be renamed to assert_dom in an upcoming release"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we think that assert_css_select or assert_dom_select is a more communicative new name than assert_dom?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so, no.


# Extracts the content of an element, treats it as encoded HTML and runs
# nested assertion on it.
Expand Down Expand Up @@ -231,6 +232,7 @@ def assert_select_encoded(element = nil, &block)
end
end
end
deprecate assert_select_encoded: "assert_select_encoded will be renamed to assert_dom_encoded in an upcoming release"

# Extracts the body of an email and runs nested assertions on it.
#
Expand Down Expand Up @@ -260,6 +262,7 @@ def assert_select_email(&block)
end
end
end
deprecate assert_select_email: "assert_select_email will be renamed to assert_dom_email in an upcoming release"

private
include CountDescribable
Expand Down