-
Notifications
You must be signed in to change notification settings - Fork 140
Conversation
spec/spec_helper.rb
Outdated
@@ -34,7 +34,7 @@ | |||
# Prevents you from mocking or stubbing a method that does not exist on | |||
# a real object. This is generally recommended, and will default to | |||
# `true` in RSpec 4. | |||
mocks.verify_partial_doubles = true | |||
mocks.verify_partial_doubles = false |
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.
I've created a follow up issue: #906
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.
Yay! This is great to have! Very neat.
(Always wondered what would be the best way to combine the two helpers, never got to figuring it out.)
There are also a few Rspec.configs in the spec/support/ dir. Personally, I wouldn't mind combining all of them in the rails_helper, instead of hidden away in a separate dir.
Un-personally, I wondered when the separate files are loaded, and if adding them to the relevant *_helper would also be an optimization?
coverage_dir File.join('coverage', Time.now.strftime('%Y%m%d-%H%M%S')) | ||
end | ||
end | ||
|
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.
Would you mind to add a comment that the Coverage things need to be at the top of the file?
I had to look that up, because it looks contrary to line 26 "Add additional requires below this line".
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.
🙇 thanks :-)
[ci skip]
@F3PiX I have no hard feelings for or against moving the config calls in |
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.
Great 💚 - thanx a lot! Another step on the way to having everything super modern here 💯 😉
This PR moves the Rails specific config to
spec/rails_helper.rb
. It's the default for the rspec-rails gem for quite a while now and also enables unit-testing without loading the Rails environment (= takes looong) by just requiringspec/spec_helper.rb
(which is indeed required automatically by.rspec
now).