Skip to content

Remove deprecation, document alias #92

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

Conversation

seanpdoyle
Copy link
Contributor

@seanpdoyle seanpdoyle commented Feb 16, 2021

Remove all deprecations of assert_select-prefixed methods, but
document the assert_dom variations.

@kaspth
Copy link
Contributor

kaspth commented Feb 16, 2021

Won't we need an alias_method :assert_select, :assert_dom etc. while we're deprecating? Or are you thinking we just ship this as 2.0?

What's Rails' and Rails apps' upgrade path for this change? Just bumping the required version in the Gemfile?

@seanpdoyle
Copy link
Contributor Author

@kaspth ah, good point about aliasing. Maybe I could have included that in #91.

Rails might be a search and replace? I'm not totally sure. Rails depends on the gem for its test suite, but also generates new apps with a dependency on this, so we'd need to account for both.

seanpdoyle added a commit to seanpdoyle/rails-dom-testing that referenced this pull request Feb 18, 2021
Bridge the gap between [rails#91][] (shipped) and [rails#92][] (open) by declaring
[alias_method][] expressions for each `assert_select` variation, adding
`assert_dom` variations to the interface.

[rails#91]: rails#91
[rails#92]: rails#92
[alias_method]: https://docs.ruby-lang.org/en/3.0.0/Module.html#method-i-alias_method
@rafaelfranca
Copy link
Member

Do we need to remove assert_select or even deprecate it? I'd just keep it as an alias and recommend the new name. Deprecating and removing will be annoying not only for us but also to the users.

@seanpdoyle seanpdoyle force-pushed the rename-assert-select-to-assert-dom branch from 529aebe to 3d2cc8d Compare February 20, 2021 00:26
@seanpdoyle seanpdoyle changed the title Rename assert select to assert dom Remove deprecation, document alias Feb 20, 2021
@seanpdoyle
Copy link
Contributor Author

@rafaelfranca that seems like a more straightforward compromise.

I've switched this branch to remove the deprecations, but I've kept the documentation changes in place to encourage usage of the assert_dom variation.

@seanpdoyle
Copy link
Contributor Author

@rafaelfranca I've rolled back the majority of rails/rails#41500 to take a similar approach.

Remove all deprecations of `assert_select`-prefixed methods, but
document the `assert_dom` variations.
@seanpdoyle seanpdoyle force-pushed the rename-assert-select-to-assert-dom branch from 3d2cc8d to 844bf49 Compare February 20, 2021 00:34
@rafaelfranca rafaelfranca merged commit 8f5acdf into rails:master Feb 20, 2021
@seanpdoyle seanpdoyle deleted the rename-assert-select-to-assert-dom branch February 20, 2021 00:48
smartech7 pushed a commit to smartech7/dom-testing-ruby that referenced this pull request Aug 4, 2023
Bridge the gap between [#91][] (shipped) and [#92][] (open) by declaring
[alias_method][] expressions for each `assert_select` variation, adding
`assert_dom` variations to the interface.

[#91]: rails/rails-dom-testing#91
[#92]: rails/rails-dom-testing#92
[alias_method]: https://docs.ruby-lang.org/en/3.0.0/Module.html#method-i-alias_method
morgoth added a commit to tiramizoo/rails that referenced this pull request Jan 21, 2025
One is the alias of the other, but assert_select is a confusing name in presence
of the assert_selector method (from Capybara).

This is a follow up to rails#54299 (comment) and
rails/rails-dom-testing#92 (comment)

[ci skip]
morgoth added a commit to tiramizoo/rails that referenced this pull request Jan 21, 2025
One is the alias of the other, but assert_select is a confusing name in presence
of the assert_selector method (from Capybara).

Also there is a conflicting `assert_select` on the Capybara itself
https://rubydoc.info/github/teamcapybara/capybara/master/Capybara%2FMinitest%2FAssertions:assert_select

This is a follow up to rails#54299 (comment) and
rails/rails-dom-testing#92 (comment)

[ci skip]
morgoth added a commit to tiramizoo/rails that referenced this pull request Jan 21, 2025
One is the alias of the other, but assert_select is a confusing name in presence
of the assert_selector method (from Capybara).

Also there is a conflicting `assert_select` on the Capybara itself
https://rubydoc.info/github/teamcapybara/capybara/master/Capybara%2FMinitest%2FAssertions:assert_select

This is a follow up to rails#54299 (comment) and
rails/rails-dom-testing#92 (comment)

[ci skip]

Co-authored-by: Petrik de Heus <[email protected]>
mrpasquini pushed a commit to mrpasquini/rails that referenced this pull request Jan 23, 2025
One is the alias of the other, but assert_select is a confusing name in presence
of the assert_selector method (from Capybara).

Also there is a conflicting `assert_select` on the Capybara itself
https://rubydoc.info/github/teamcapybara/capybara/master/Capybara%2FMinitest%2FAssertions:assert_select

This is a follow up to rails#54299 (comment) and
rails/rails-dom-testing#92 (comment)

[ci skip]

Co-authored-by: Petrik de Heus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants