Closed mskog closed 2 months ago
Hey @mskog thanks for the suggestion! This is the first time I have seen this gem but looks interesting.
Definitely, I'm looking forward to adding support for RSpec 3rd party plugins as much as possible in the future, and I think rspec-given
gem would also be a good fit here.
Or allow keyword example method definition as well like the "let_methods" configuration option perhaps.
I like this idea, as this would make it extensible for other customizations too. I'm pretty sure there are others out there adding custom example methods in their project so this would be very beneficial.
As this is a very "good first issue" and you seem already interested in it and came up with a great idea, feel free to give it a try! To give you some hints, this is the test that you probably will need to fiddle with:
and here's how the current let_methods
configuration comes into play:
I believe we would need something similar here:
Let me know if you face any hurdles!
PS. Please assign this issue yourself if you decide to work on it, and unassign it if you can't find enough time.
I don't think that I have permission to assign issues, but I've added a PR in https://github.com/lekemula/solargraph-rspec/pull/6
Our team uses the rspec-given gem as originally created by Jim Weirich: https://github.com/jimweirich/rspec-given
Now maintained here: https://github.com/rspec-given/rspec-given
Essentially all we need to do to get this working is to add "Then" and "And" keywords to work as example methods. Or allow keyword example method definition as well like the "let_methods" configuration option perhaps.
Is this something that you would accept in this project? I can add it myself if you want!