-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Prevent collisions on let(:name) and let(:method_name) #2461
Conversation
lib/rspec/rails/fixture_support.rb
Outdated
# Monkey patched to avoid collisions with 'let(:name)' in Rails 6.1 and after | ||
# and let(:method_name) before Rails 6.1. | ||
def run_in_transaction? | ||
use_transactional_tests && !self.class.uses_transaction?(@example) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not “reviewing,” just curious - were you able to determine whether any RSpec code still sets @example
to a meaningful value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I didn't search this yet. But I will.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For us this probably needs to be example
or self
as we don't assign @example
within a test like mini test does afaik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you!
c44c923
to
ee760f2
Compare
Rebased. Green. |
Prevent collisions on let(:name) and let(:method_name)
Prevent collisions on let(:name) and let(:method_name)
It seems like rails 6.1 broke rspec <4.0 until it was fixed with rspec/rspec-rails#2215 then fixed differently with rspec/rspec-rails#2461 so we skip rspec 3x with rails 6.1 in CI
It seems like rails 6.1 broke rspec <4.0 until it was fixed with rspec/rspec-rails#2215 then fixed differently with rspec/rspec-rails#2461 so we skip rspec 3x with rails 6.1 in CI
It seems like rails 6.1 broke rspec-rails. RSpec-rails 4.0 fixed it with rspec/rspec-rails#2215 then fixed differently with rspec/rspec-rails#2461 so we skip rspec-rails >4 with rails 6.1 in CI
It seems like rails 6.1 broke rspec-rails. RSpec-rails 4.0 fixed it with rspec/rspec-rails#2215 then fixed differently with rspec/rspec-rails#2461 so we skip rspec-rails >4 with rails 6.1 in CI
It seems like rails 6.1 broke rspec-rails. RSpec-rails 4.0 fixed it with rspec/rspec-rails#2215 then fixed differently with rspec/rspec-rails#2461 so we skip rspec-rails >4 with rails 6.1 in CI
It seems like rails 6.1 broke rspec-rails. RSpec-rails 4.0 fixed it with rspec/rspec-rails#2215 then fixed differently with rspec/rspec-rails#2461 so we skip rspec-rails >4 with rails 6.1 in CI
It seems like rails 6.1 broke rspec-rails. RSpec-rails 4.0 fixed it with rspec/rspec-rails#2215 then fixed differently with rspec/rspec-rails#2461 so we skip rspec-rails >4 with rails 6.1 in CI
It seems like rails 6.1 broke rspec-rails. RSpec-rails 4.0 fixed it with rspec/rspec-rails#2215 then fixed differently with rspec/rspec-rails#2461 so we skip rspec-rails >4 with rails 6.1 in CI
Some of the missing combinations in the matrix: * Ruby 3 with Rails 5.2 are skipped because my tests error when trying to start rails * Rspec-rails 3 with Rails 6.1 because of a rails change rspec-rails needs rspec/rspec-rails#2215 or the more recent rspec/rspec-rails#2461
Some of the missing combinations in the matrix: * Ruby 3 with Rails 5.2 are skipped because my tests error when trying to start rails * Rspec-rails 3 with Rails 6.1 because of a rails change rspec-rails needs rspec/rspec-rails#2215 or the more recent rspec/rspec-rails#2461
Some of the missing combinations in the matrix: * Ruby 3 with Rails 5.2 are skipped because my tests error when trying to start rails * Rspec-rails 3 with Rails 6.1 because of a rails change rspec-rails needs rspec/rspec-rails#2215 or the more recent rspec/rspec-rails#2461
Fix: #2451
Two commits. One to see the failures then one to see the fix. I did nothing specific, just implement the great work of @grekko and the choice from @JonRowe.