You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's a bad practice to create records outside the example scope.
By the example scope, I mean inside example groups or before hooks.
See this discussion rubocop/rubocop-rspec#1648
This is more of a help request than an issue, let me know if there's a better place I can direct this.
I also posted this on StackOverflow
Please excuse my rustiness, first time touching Rails and this project in quite some time.
What Ruby, Rails and RSpec versions are you using?
Ruby version: 2.5.0
Rails version: 5.1.7
RSpec version: 3.9.3
This is my
scripts_controller_spec.rb
file with model creation and the test in question:When running the tests, the print line above outputs this, as expected:
However, I get this test failure:
My
scripts_controller.rb
index function looks like so:Here's the full repository - https://github.com/AakLak/rs_script_stats
Let me know if you need any more info, and thanks for your help!
The text was updated successfully, but these errors were encountered: