Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 12:23
    harry-graham commented #1219
  • 12:21
    harry-graham commented #1219
  • 12:18
    pirj commented #1219
  • 12:18

    pirj on master

    Exclude task type specs from RS… Merge pull request #1219 from h… (compare)

  • 12:18
    pirj closed #1219
  • 12:18
    pirj closed #1218
  • 12:16
    pirj commented #1219
  • 12:16
    pirj synchronize #1219
  • 12:09
    harry-graham commented #1219
  • 12:08
    pirj commented #1219
  • 12:07
    harry-graham synchronize #1219
  • 11:53
    pirj edited #1219
  • 11:23
    harry-graham commented #1218
  • 11:23
    harry-graham opened #1219
  • 07:50
    pirj commented #1218
  • Dec 08 08:41
    harry-graham edited #1218
  • Dec 08 08:41
    harry-graham edited #1218
  • Dec 07 23:54
    harry-graham edited #1218
  • Dec 07 23:50
    harry-graham opened #1218
  • Dec 06 17:15
    pirj closed #1217
John Backus
@backus
@bquorning I assume you read up on the docs in the NodePattern file for rubocop, right?
Just noticed that you mentioned that the docs were hard to find
Benjamin Quorning
@bquorning
I actually hadn’t scrolled to the very top of the file, no. Reading through the docs now, and it still seems pretty complex.
Practise makes perfect, I guess.
John Backus
@backus
yeah complex but super useful
it also makes a lot of sense imo
you can just do like ruby-parse -e "source_i_want(to, detect)" and paste that into the node matcher and start editing
Benjamin Quorning
@bquorning
@backus When you have a bit of time, I’d love some feedback on backus/rubocop-rspec#226 and backus/rubocop-rspec#224
John Backus
@backus
@bquorning I finally found time to do a bit more thorough review of #224. I found a few more flags but overall the functionality and cop is great.
John Backus
@backus
@bquorning happy to do a new release whenever you'd like with the new cop
Benjamin Quorning
@bquorning
@backus Should we release a v1.9.0 from the current master, or do we have any PRs that should be merged first?
John Backus
@backus
@bquorning Yeah sure. Could you do a version bump PR and update the changelog? I'll review quickly when you tag me then you can push out that release
Looks like this is missing from the changelog backus/rubocop-rspec@7e8e864
Can view all changes since last release here https://github.com/backus/rubocop-rspec/compare/v1.8.0...master
Benjamin Quorning
@bquorning
Bumping to v1.9.0 in backus/rubocop-rspec#265
John Backus
@backus
@bquorning @andyw8 FYI I'm adding @dgollahon as a collaborator on the project as well. He is my co-worker and we talk a lot offline about rubocop-rspec. I'm sure you've seen him weigh in on a handful of issues and PRs I've pinged him on
Benjamin Quorning
@bquorning
:+1:
Gautham Goli
@GauthamGoli
I'm trying to write a RSpec test for a custom cop that I wrote. When I run the spec, the violations are not getting detected even though I passed the right cop and source code with violations. Can someone help?
John Backus
@backus
@GauthamGoli is this specifically for rubocop-rspec? In that case you might be running into a sort of common issue with inspect_source
Gautham Goli
@GauthamGoli
No. I'm writing it independently
John Backus
@backus
Ah. Can you share the source and failing test?
John Backus
@backus
@GauthamGoli I looked at it quickly locally and it seems like on_formula isn't even being invoked
I'd recommend asking whoever wrote the other homebrew rubocop cop
Unfortunately I can't help you further since it would just be me cloning your project and debugging for you. Good luck
Gautham Goli
@GauthamGoli
@backus Thanks. The other homebrew rubocop cop was written by me. When I run the cop using rubocop on_formula is being invoked and everything works fine, violations are being reported. But with Rspec the violations don't get reported even though everything is the same. :/
Gautham Goli
@GauthamGoli
@backus Thanks for your help. Figured out the problem!
John Backus
@backus
/all I open sourced a new little tool. Check it out https://github.com/backus/yardcheck
Mohit Gupta
@mohitgpt24
how can we Test presence of javascript code/snippet with rspec capybara?
John Backus
@backus
@bquorning @Darhazer please don't feel a need to wait on me for the next few months. If you approve of a PR then just merge it and if something seems worthy of a release then just push it to rubygems :smile:
I'm slammed with work currently and will be until at least 2018
Tomasz Pajor
@nijikon
Hi
I have a question regarding such code
it 'sets active from context' do
  expect(IdentifyWorker).to have_received(:perform_async).with(any_args) do |_, _, _, context|
    expect(context.active).to eq(false)
  end
end
What is a better way to test this so I won't get this error
RSpec/MultipleExpectations: Example has too many expectations [2/1]
Maxim Krizhanovsky
@Darhazer
Use custom matchers. See the discussion at backus/rubocop-rspec#379
Tomasz Pajor
@nijikon
@Darhazer thanks!
Maxim Krizhanovsky
@Darhazer
Hey. I'm playing around with mutest and a lot of mutation it gives is because we are providing the default location value to add_offense. How should I deal with such mutations? I'm a bit hesitating to remove the explicit location value, in case the default changes
Maxim Krizhanovsky
@Darhazer
@bquorning I'll be off for a month. I may not finish #532 / #533
Benjamin Quorning
@bquorning
@Darhazer Enjoy your time off. It’s going to be awfully quiet without your contributions, and I’ll look forward to having you back :-)
Thomas Johnson
@no-reply
honestly, it's not clear to me what
if rubocop-rspec isn't required before RSpec/FilePath is referenced...
means in the context of a .rubocop.yml. I'm attempting to disable the rule in a pretty typical rails app setup, running rubocop with bundle exec rubocop and hitting this issue.
bundle exec rubocop --format emacs /home/tjohnson/src/hyrax-spec/                                                                                                                                                                                                               
.rubocop.yml: Style/FileName has the wrong namespace - should be Naming                                                                                                                                                                                                         
.rubocop.yml: RSpec/FilePath has the wrong namespace - should be Rails                                                                                                                                                                                                          
/home/tjohnson/src/hyrax-spec/lib/hyrax/spec/factory_bot/build_strategies/actor_create_spec.rb:4:1: C: RSpec/FilePath: Spec path should end with `hyrax/spec/actor_create*_spec.rb`.                                                                                            

Compilation exited abnormally with code 1 at Wed Feb  7 21:01:20
Phil Pirozhkov
@pirj
Hey!
There's a bunch of things in master, WDYT of cutting a release?
https://github.com/rubocop-hq/rubocop-rspec/blob/e1f4244/CHANGELOG.md
Sergey Kojin
@skojin
Hi, why when I want to use only one rule, this config not works?
RSpec:
  Enabled: false
RSpec/Focus:
  Enabled: true
Phil Pirozhkov
@pirj
@skojin Sorry for the late response. Can you please try:
AllCops:
  RSpec:
    Enabled: false
RSpec/Focus:
  Enable: true