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

Fix failing fixture support test on Rails main #2733

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

eugeneius
Copy link
Contributor

This test is failing since setup_fixtures was made private in rails/rails#51021.

It was added in #2215 to exercise the call to name in Rails' run_in_transaction? method: https://github.com/rails/rails/blob/b4ab1f19d8bcc4639c7379b560f000f01753b5b0/activerecord/lib/active_record/test_fixtures.rb#L101

However since #2461, RSpec Rails overrides run_in_transaction?, so name is no longer called. We can get even better integration coverage of an example group with use_transactional_tests set to false by actually running an example.

This test is failing since setup_fixtures was made private in
rails/rails@29fe344.

It was added in 82241e9 to exercise the
call to `name` in Rails' `run_in_transaction?` method:
https://github.com/rails/rails/blob/b4ab1f19d8bcc4639c7379b560f000f01753b5b0/activerecord/lib/active_record/test_fixtures.rb#L101

However since 9272757, RSpec Rails
overrides `run_in_transaction?`, so `name` is no longer called. We can
get even better integration coverage of an example group with
use_transactional_tests set to false by actually running an example.
@JonRowe JonRowe merged commit 0142b1e into rspec:main Feb 20, 2024
17 checks passed
@JonRowe
Copy link
Member

JonRowe commented Feb 20, 2024

Thanks!

JonRowe added a commit that referenced this pull request Feb 23, 2024
Fix failing fixture support test on Rails main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants