Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support auto converting doc strings to plain strings #380

Merged
merged 1 commit into from Mar 16, 2021

Conversation

chirino
Copy link
Contributor

@chirino chirino commented Mar 9, 2021

This PR allows you to implement the following step:

  Scenario: example
    Given call with:
    """
    text
    """

with a simpler function signature like:

ctx.Step(`^call with:$`, func(arg string) error {
	return nil
})

vs. what you have to do now which is:

ctx.Step(`^call with:$`, func(arg *godog.DocString) error {
	return nil
})

@codecov
Copy link

codecov bot commented Mar 9, 2021

Codecov Report

Merging #380 (80eb14d) into master (3589a9b) will increase coverage by 0.09%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #380      +/-   ##
==========================================
+ Coverage   81.03%   81.13%   +0.09%     
==========================================
  Files          25       25              
  Lines        1993     1998       +5     
==========================================
+ Hits         1615     1621       +6     
+ Misses        275      274       -1     
  Partials      103      103              
Impacted Files Coverage Δ
internal/models/stepdef.go 61.06% <62.50%> (+2.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3589a9b...80eb14d. Read the comment docs.

@lonnblad
Copy link
Member

lonnblad commented Mar 9, 2021

Hi @chirino, thanks for the contribution!

Could you add a test in this file as well.
https://github.com/cucumber/godog/blob/master/internal/models/stepdef_test.go

Thanks!
BR Fredrik

@chirino
Copy link
Contributor Author

chirino commented Mar 13, 2021

ok test added.

@lonnblad lonnblad merged commit 2b6c9dc into cucumber:master Mar 16, 2021
@aslakhellesoy
Copy link
Contributor

Hi @chirino,

Thanks for your making your first contribution to Cucumber, and welcome to the Cucumber committers team! You can now push directly to this repo and all other repos under the cucumber organization! 🍾

In return for this generous offer we hope you will:

  • ✅ Continue to use branches and pull requests. When someone on the core team approves a pull request (yours or someone else's), you're welcome to merge it yourself.
  • 💚 Commit to setting a good example by following and upholding our code of conduct in your interactions with other collaborators and users.
  • 💬 Join the community Slack channel to meet the rest of the team and make yourself at home.
  • ℹ️ Don't feel obliged to help, just do what you can if you have the time and the energy.
  • 🙋 Ask if you need anything. We're looking for feedback about how to make the project more welcoming, so please tell us!

On behalf of the Cucumber core team,
Aslak Hellesøy
Creator of Cucumber

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.

None yet

3 participants