Phil Pirozhkov
Phil Pirozhkov
[`RSpec/EmptyLineAfterHook` has a `AllowConsecutiveOneLiners` option](https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecemptylineafterhook), see [example](https://github.com/rubocop/rubocop-rspec/blob/master/spec/rubocop/cop/rspec/empty_line_after_hook_spec.rb#L328): ```ruby RSpec.describe User do before { do_something } before { do_something_else } it { does_something } end ``` Do you also suggest to...
[`instance_double` accepts a class](https://github.com/rspec/rspec-mocks/blob/97c972be57f2c060a4a7fb8a3c5700a5ede693f0/lib/rspec/mocks/example_methods.rb#L38), and so does `class_double`/`instance_spy`. I see no good reasons not to use this. Except to avoid excessive class loading when `instance_double` and the class is referenced...
I can also add that changing from a class literal to a string/symbol arguably makes the cop unsafe unless [`verify_doubled_constant_names`](https://github.com/rspec/rspec-mocks/blob/3-11-maintenance/lib/rspec/mocks/configuration.rb#L115) is turned on. It is [off by default in RSpec...
Controller specs are deprecated in favour of request specs. Do you think it still makes sense to implement this?
There's a long thread in a quite recent #919 with a lot of thoughts on predicate matchers. Unrelated to this question, but linking anyway since this relates to the same...
I'm not convinced enought that the latter is a proper semantic replacement for the former. ```ruby expect(parser.handles?('string')).to be_truthy expect(parser).to be_handled.by('string') ``` Not to say it's not supported by RSpec itself,...
My only concern is that there should be a cop to detect offense in the following code: ``` eq([single]) ``` and propose to replace with `contains_exactly(single)`. I'm not sure what...
@Darhazer the cops seem to be one hair from the finish line. Are you up to finish it?
I suggest adding a `(block` part to the node pattern. I've checked that `fit` without a block does not focus, so it does not make much sense to flag it....
Is this it? Can you provide more context? Is this all of the output? What command are you running? Can you create a minimal all that allows to reproduce the...