Skip to content

Added example_methods configuration option#6

Merged
lekemula merged 2 commits into
lekemula:mainfrom
mskog:configuration_example_methods
Jul 10, 2024
Merged

Added example_methods configuration option#6
lekemula merged 2 commits into
lekemula:mainfrom
mskog:configuration_example_methods

Conversation

@mskog

@mskog mskog commented Jul 3, 2024

Copy link
Copy Markdown
Contributor

Adds the example_methods to define your own example methods.

Fixes #5

Test guide

Install a local version of the gem in a project that uses solargraph and rspec.

Configure rspec in your .solargraph.yml configuration file like so

rspec:
  example_methods:
    - my_it

Open a spec file and add something like this:

  describe "something" do
    let(:foobar){"hello"}

    my_it do
      expect(foobar).to eq "hello"
    end

    it do
      expect(foobar).to eq "hello"
    end
  end

The behavior should be equivalent. Go-to-definition etc should work like expected.

@mskog mskog mentioned this pull request Jul 3, 2024
@lekemula
lekemula self-requested a review July 5, 2024 15:00
@codecov

codecov Bot commented Jul 5, 2024

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@lekemula lekemula left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mskog Thanks for the great suggestion and for putting up this PR! 🙏 It looks great.

I'll give it a quick test over the weekend and merge it right afterward.

Comment thread README.md
@lekemula

Copy link
Copy Markdown
Owner

@mskog tested it locally and it worked as expected :)

Great work! Merging and cutting a new version shortly after. 🚀

@lekemula
lekemula merged commit 49baac4 into lekemula:main Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for rspec-given?

2 participants