Phil Pirozhkov

Results 551 comments of Phil Pirozhkov

One example of a legitimate usage of a variable https://github.com/rubocop-hq/rubocop/pull/8447#discussion_r467528726 > inefficient since it gets defined every test example. Is that the reason No, just because variables are simpler.

Sounds great @thijsnado đź‘Ť

@thijsnado No worries, there's a fix https://github.com/rubocop-hq/rubocop-rspec/pull/1014 It's caused by https://github.com/rubocop-hq/rubocop/issues/8561

Interesting. Does ``` allow(JSON).to receive(:parse).never ``` work as you expect it to? Would calling a `JSON.parse` later in the example result in a failure? I’d say: - we need to...

Sorry, I didn’t read the article, but the description of this is misleading. With self:: (or anything:: really), you explicitly specify the owner of the constant. The problem that this...

The problem with the approach described in the article is that examples may litter class, and those changes would persist between examples. The cop was initially introduced to avoid side...

> This is true of any class defined in any location. let(:klass) { Class.new { } } won’t suffer from this. But in general - yes, it’s possible to use...

It seems that the problem is in the unintuitive behaviour of the return statement inside a block. I can still see usefulness of guard statements in tests.

https://api.rubyonrails.org/v6.0/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html#method-i-transaction documents `joinable` while not the recent. What happened?

https://github.com/rubocop/rubocop-rails/pull/414 Related