Sam Bostock
Sam Bostock
The two features I use the most from Pry are `show-source` (via the alias `$`), and `ls` (sometimes with `--grep`). As someone who installs `pry` on most of my projects,...
Ooh, interesting 🤔 Where would you put that message? Would you attach it to every offence? I feel like that might be a little noisy, especially for projects which aren't...
Perhaps. I can't think of any cops that do that off the top of my head. It occurs to me that maybe this concern is solved by the cop not...
I've made some updates - Add documentation & examples - Fix formatting and other offences - Remove erroneous `Timecop.return` with block correction - Add commented out Rails 6 specs for...
Looks like RSpec doesn't run the `after_teardown` hook automatically, so **`TimeHelpers` isn't safe without using blocks** outside of Minitest. I'm trying to figure out how to get it to run....
@bquorning I actually started looking into implementing a Safe Mode in `TimeHelpers` to force you to use blocks, but realized it's unneeded, due to [`TimeHelpers#after_teardown`](https://github.com/rails/rails/blob/94b5cd3a20edadd6f6b8cf0bdf1a4d4919df86cb/activesupport/lib/active_support/testing/time_helpers.rb#L55-L58), which makes sure `travel_back` is...
@dogweather, see [my comment above](https://github.com/rubocop-hq/rubocop-rails/pull/38#issuecomment-464766847) addressing why `freeze_time` has no safe mode. @pirj Things got in the way and this slipped through the cracks, but yes, I'd like to. Looks...
@pirj sorry for the... multi-year delay... 😅 I've updated the branch. The tests should be passing, docs should be complete (and include the RSpec caveats). Unless I've missed anything, this...
After running some testing against some of our code, I've discovered there are edge cases where the correction is arguably unsafe. For example: ```diff -Timecop.freeze do +freeze_time do # ......
Thanks for the info, @koic! I agree that if this cop was advising on the correct use of `Timecop`, it would make sense as an extension. However, given this cop's...