Phil Pirozhkov

Results 628 comments of Phil Pirozhkov

How about ```ruby include_examples 'some shared example' do let!(:user) { create :user } end ```

Agree. Another exception would be an example group that is including examples, since it's impossible to determine if it's referenced or not.

@StuartHadfield Why would you use a bang-`let` over a regular `let`, if the variable is referenced from a top-level `subject` definition, i.e. is always initialized? @njm506 Can you please describe...

I don't receive any offences @njm506 ``` Inspecting 1 file C Offenses: spec/a_spec.rb:1:1: C: Style/FrozenStringLiteralComment: Missing frozen string literal comment. RSpec.describe 'A' do ^ spec/a_spec.rb:15:81: C: Layout/LineLength: Line is too...

As per (https://github.com/rspec/rspec-core/blob/master/lib/rspec/core/memoized_helpers.rb#L10): > `subject` was contributed by Joe Ferris to support the one-liner syntax embraced by shoulda matchers `subject`'s implementation [is based on `let`](https://github.com/rspec/rspec-core/blob/e4e10d9/lib/rspec/core/memoized_helpers.rb#L418), and if it's a named...

> name for this cop. Any suggestions? Or `RSpec/LetWarmUp`.

I'm thinking of how to deal with `before` and `let` on different nesting levels. 1. `before` is deeper: ```ruby let(:foo) { Bar.foo } context 'with warm-up' do before { foo...

That would be great to unify doc tasks with other repos. Since it's `docs/` that get deployed to https://docs.rubocop.org/rubocop-rspec/, I guess we can retire `manual/`. We still have a link...

@bquorning Do you think there's anything actionable left here?

A small benchmark to keep in mind the performance implications of `double`/`instance_double`. ```ruby require 'benchmark/ips' Benchmark.ips do |x| class X attr_reader :a, :b def initialize(a, b) @a = a @b...