Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FixtureSupport's run_in_transaction? method
`ActiveRecord::TestFixture`'s `uses_transaction` is designed to be used like this: ```ruby uses_transaction :the_test_method_name ``` And in RSpec, the method name would be the example's name. ```ruby uses_transaction "does someting" it "does someting" {} ``` But in the current implementation, it's passing the example object instead of its name, which would always fail the name comparison in https://github.com/rails/rails/blob/adc0146a07ccc72405aec78ccb65aac3502a4300/activerecord/lib/active_record/test_fixtures.rb#L94-L97 So this commit fixes the issue by passing the example's name instead of the example object.
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters