-
-
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
RSpec 4.1 breaks on Rails 4.2 #2477
Comments
👋 RSpec-Rails 4.x maintains a soft support for Rails 4.2, but we don't actively maintain it, if you'd like to tackle this in a PR please do and I'll release it as a bugfix. |
Hi. We just encountered the same problem too. For the time being we also |
I see no changes from 4.0.1 https://github.com/rspec/rspec-rails/blob/4-1-maintenance/lib/rspec/rails/fixture_support.rb#L27 and Travis suggests that this line is involved https://github.com/diowa/ruby2-rails4-bootstrap-heroku/blob/8a9810d2e4cdc2f9df70a0e4e172afe51962b36b/spec/support/database_cleaner.rb#L12, but doesn't provide any details. Can you please provide a more detailed backtrace to pinpoint the issue? @yo-it-engineer maybe you have one? |
You appear to be looking at 4-1-maintenance there @pirj |
@pirj I'm not sure if I can explain it well, but when our Rails
https://github.com/rspec/rspec-rails/blob/v4.1.1/lib/rspec/rails/fixture_support.rb#L16 the I try to tweak around and this is the way I was able to get rid of the error: |
Rails 4.2 does not have `use_transactional_tests` defined Fix rspec#2477
Hi, I've tracked down the issue to 073daad If you can live with a No problems into adding a conditional against rails version or a edit: I think @yo-it-engineer's solution is more accurate, but I don't know if Rails 4.2 as the same issue described in the comments, I should run specs against Rails 4.2 on my development machine |
Nice research, @tagliala ! 👏 WDYT of mimicking Rails 4.2's behaviour and doing it like it does? https://github.com/rails/rails/blob/0ecaaf76d1b79cf2717cdac754e55b4114ad6599/activerecord/lib/active_record/fixtures.rb#L922 |
Rails 4.2 does not have `use_transactional_tests` defined Fix rspec#2477
Please find a Draft PR at #2479 It contains an approach like the one suggested by @yo-it-engineer and uniform to the approach used in the |
Rails 4.2 does not have `use_transactional_tests` defined Fix rspec#2477
Closed by #2480 |
A fix for this will be released later today as 4.1.2. (Please note future travellers, this does not mean we are supporting Rails 4.2 on this series of RSpec, this was an exception to the rule 😃 ) |
What Ruby, Rails and RSpec versions are you using?
Ruby version: 2.4.10
Rails version: 4.2.11.3
RSpec version: 4.1.0
Observed behaviour
RSpec 4.1 does not work start on Rails 4.2.11.3, while 4.0 does
Tracked down with
git bisect
down to 073daadExpected behaviour
Keeps working with Rails 4.1 or
gemspec
specifies>= 5.0
to prevent update to 4.1https://github.com/rspec/rspec-rails/blob/main/rspec-rails.gemspec#L36
Can you provide an example app?
Travis CI failure: https://travis-ci.org/github/diowa/ruby2-rails4-bootstrap-heroku/builds/761888443
The text was updated successfully, but these errors were encountered: