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

Can't log objects #1410

Closed
aslakhellesoy opened this issue Apr 26, 2020 · 1 comment
Closed

Can't log objects #1410

aslakhellesoy opened this issue Apr 26, 2020 · 1 comment
Labels
🐛 bug Defect / Bug

Comments

@aslakhellesoy
Copy link
Contributor

aslakhellesoy commented Apr 26, 2020

Summary

Can't log objects

Expected Behavior

This statement:

log Date.parse('2020-02-03')

prints:

2020-02-03

Current Behavior

I get an error:

Cucumber::LogTypeInvalid (Cucumber::LogTypeInvalid)

Possible Solution

Allow any object and call #to_s on it

Your Environment

  • Version used: 4.0.0.rc.6
  • Operating System and version: MacOS
@aslakhellesoy aslakhellesoy added the 🐛 bug Defect / Bug label Apr 26, 2020
@vincent-psarga
Copy link
Contributor

vincent-psarga commented Apr 27, 2020

Ok it makes sense. That said, originally, we decided to go for an approach where the user had to handle himself the to_s part and raise an exception if something than a String was logged.
cucumber/common#897 (comment)

Should we also make the change in the other Cucumber implementations ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Defect / Bug
Projects
None yet
Development

No branches or pull requests

2 participants