Phil Pirozhkov

Results 628 comments of Phil Pirozhkov

I've also tried with a named `OpenStruct`, but it was almost as slow as a named double. I assume `double` is as fast as it can be. Agree that `OpenStruct`...

@ahukkanen Thanks for reporting, nice catch. > But maybe this would possibly reintroduce the problems Let's check if specs fail. If they do not - a pull request is welcome.

The spec shouldn't break, as it expected to be detected that it's an incorrect match (`expect_offense` is used). I suggest extending the `filename_ends_with?` so that it is able to detect...

For sure, I don't have a solution ready off the top of my head. But you can do it. Start with a spec that will pass for your case. I'll...

Do you mind closing this if this is a non-issue for you?

I feel it's a bug, but I also feel it will never be fixed unless someone wants to scratch their own itch. To make sure it's eventually fixed I suggest...

It doesn't seem that those can be easily added. I've played around by adding `to_not` to `rubocop`'s `config/default.yml`, `to` to `rubocop-rspec`'s `config/default.yml`, and `not_to` to local project's `.rubocop.yml`. Only `not_to`...

@claudiosv that would be awesome! You can copy-paste lib/rubocop/cop/rspec/capybara/visibility_matcher.rb, extract the common `CAPYBARA_MATCHER_METHODS` and `capybara_matcher?`. For the node pattern to match this should work: ```ruby def_node_matcher :negative_expectation_matcher?,

There is also a pull request to move hardcoded definitions into configuration https://github.com/rubocop-hq/rubocop-rspec/pull/956, you may as well move `CAPYBARA_MATCHER_METHODS` there @claudiosv

I'm not certain why `.with_message` is specifically needed, as `raise_error` itself accepts [a second argument for message matching](https://relishapp.com/rspec/rspec-expectations/v/3-9/docs/built-in-matchers/raise-error-matcher#matching-message-with-%60with-message%60): ``` expect { raise "oops" }.to raise_error(RuntimeError, /op/) ``` It might be...