Phil Pirozhkov
Phil Pirozhkov
I can't reproduce with rubocop-rspec-1.42.0, rubocop-0.88.0 with the following: ```ruby # frozen_string_literal: true RSpec.describe 'Something' do let(:subject_class) { Myapp::Diagnostic::Something } let(:useful_const) { subject_class::WHATEVER } it do expect(subject_class.call).to eq(useful_const) end end...
@emailrhoads Ping
I don't have the whole picture, but I understand the case. At first, defining the `subject` in `include_context` sounds a bit awkward, but I understand that you have reasons to...
Seems closely related to https://github.com/rubocop-hq/rubocop-rspec/issues/333
@januszm Pull request is welcome! cc @itay-grudev I imagine you'd have to tweak this logic https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/cop/rspec/cop.rb#L43 or maybe take a look at the other RuboCop extensions how they manage to...
Thanks for reporting. This is somehow related to https://github.com/rubocop/rubocop-rspec/issues/379 I suggest adding `IgnoreChained` or `MaxChained` option to the cop. A PR is welcome.
Since `LeakyConstantDeclaration` cop was added to flag constant definitions. `RSpec/InstanceVariable` is completely ignorant to: ```ruby RSpec.describe do let(:bar) do Class.new do def initialize(name) @name = name end def execute p...
Mixed-style will only lead to confusion especially in cases when constant stubbing and class reopening are scattered: ```ruby before do stub_const('Foo', Class.new) end context 'when Foo has some specific method...
> how independent our cops should be designed Now I think I understand what you mean. So speaking about this specific case in question, when class is defined directly in...
Great idea. There's [this](https://github.com/rubocop-hq/ruby-style-guide/#method-invocation-parens) in the Ruby Style Guide: > Always omit parentheses for > Methods that are part of an internal DSL (e.g., Rake, Rails, RSpec): > validates :name,...