foneandrew / ruby-spec-runner

Run specific rspec & minitest tests from within vscode
MIT License
9 stars 3 forks source link

"Run" button not showing for rspec when describe contains class name and string #4

Closed steveclarke closed 1 year ago

steveclarke commented 1 year ago

When my spec starts with:

RSpec.describe Unio::Services::MemberDuesCalculator, "for retired member" do

No "Run" codelens button appears above the top level RSpec.describe

I can take a look at this when I get a few moments.

foneandrew commented 1 year ago

Tweaked the regex to handle this scenario. Fix is in version 3.5.1. Am learning lots about the different ways we can write specs in rspec haha.

steveclarke commented 1 year ago

I just updated and it works! Much appreciated.

I only recently discovered that technique recently. It allows you to still use described_class while making the spec output more readable when testing the same class from multiple files.