Phil Pirozhkov
Phil Pirozhkov
Those two comments suggest that automatic inferring is legacy [[1](https://github.com/rspec/rspec-rails/pull/1541#issuecomment-177342647), [2](https://github.com/rspec/rspec-rails/issues/2507#issuecomment-1107794265)]. I don't have an idea if `infer_spec_type_from_file_location!` will be deprecated or removed and when. `define_derived_metadata` provides the same, and...
Thank you, @r7kamura !
We have this on our radar, see https://github.com/rubocop/rubocop-rspec/discussions/1440 But it’s unlikely that this will happen soon. You can say the same about FactoryBot, and Capybara. For now, rubocop-rspec is an...
No, it's not possible (to do this reliably) in RSpec, too, since rspec-mocks/rspec-expectations are not the only way of making expectations, e.g. `assert_nil` being one I frequently see. There was...
> Unnecessary disabling of RSpec/NoExpectationExample This would be better reported to the parent project https://github.com/rubocop/rubocop/issues/ > meta-programming is difficult for linters like RuboCop. Not only. Also for people if its...
Can you provide an example of a spec with `has_text?`, @texpert ?
```ruby it 'has a `New Feed` link' do within('body') do has_link?('New Feed', exact: true) end end ``` Are you confident that this code is correct, @texpert ? Isn't it a...
As I can see from [the source of e.g. `has_link?`](https://github.com/teamcapybara/capybara/blob/a9fd24012257bba2afa6f36b7c99231c6a069a5e/lib/capybara/node/matchers.rb#L334), ```ruby def has_link?(locator = nil, **options, &optional_filter_block) has_selector?(:link, locator, **options, &optional_filter_block) end ``` ```ruby def has_selector?(*args, **options, &optional_filter_block) make_predicate(options) {...
Personally, I follow the recommendation to use helper methods that is supported by the Effective Testing with RSpec book. However, since for static checking it creates complications, do you think...
[Mildly related discussion in the style guide](https://github.com/rubocop/rspec-style-guide/issues/70)