-
Notifications
You must be signed in to change notification settings - Fork 85
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
Lots of warnings about when running unit tests #302
Labels
Comments
After a bunch of testing, it looks like the parse error is at
The ERB error, on the other hand, is easy to fix as long as the minimum ruby version is 2.6.0. |
danielparks
added a commit
to danielparks/puppet-strings
that referenced
this issue
Sep 25, 2022
Unfortunately, this fix will not work with Ruby <2.6.0.
danielparks
added a commit
to danielparks/puppet-strings
that referenced
this issue
Sep 25, 2022
This has to special case Ruby <2.6.0 since those versions will interpret the keyword argument as a hash passed as the second argument. Without this change running this code in Ruby 2.6+ will generate warnings about the parameters passed to `ERB.new`.
I fixed the ERB error for all supported Ruby versions: main...danielparks:puppet-strings:fix_erb |
danielparks
added a commit
to danielparks/puppet-strings
that referenced
this issue
Sep 26, 2022
This has to special case Ruby <2.6.0 since those versions will interpret the keyword argument as a hash passed as the second argument. Without this change running this code in Ruby 2.6+ will generate warnings about the parameters passed to `ERB.new`.
danielparks
added a commit
to danielparks/puppet-strings
that referenced
this issue
Sep 26, 2022
This has to special case Ruby <2.6.0 since those versions will interpret the keyword argument as a hash passed as the second argument. Without this change running this code in Ruby 2.6+ will generate warnings about the parameters passed to `ERB.new`.
danielparks
added a commit
to danielparks/puppet-strings
that referenced
this issue
Sep 26, 2022
This has to special case Ruby <2.6.0 since those versions will interpret the keyword argument as a hash passed as the second argument. Without this change running this code in Ruby 2.6+ will generate warnings about the parameters passed to `ERB.new`.
danielparks
added a commit
to danielparks/puppet-strings
that referenced
this issue
Sep 26, 2022
This has to special case Ruby <2.6.0 since those versions will interpret the keyword argument as a hash passed as the second argument. Without this change running this code in Ruby 2.6+ will generate warnings about the parameters passed to `ERB.new`.
chelnak
pushed a commit
to danielparks/puppet-strings
that referenced
this issue
Sep 26, 2022
This has to special case Ruby <2.6.0 since those versions will interpret the keyword argument as a hash passed as the second argument. Without this change running this code in Ruby 2.6+ will generate warnings about the parameters passed to `ERB.new`.
Fixed in #302 - Thanks @danielparks |
chelnak
added a commit
that referenced
this issue
Sep 26, 2022
(#302) Fix warnings generated by ERB.new
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the Bug
Running
bundle exec rake spec
generates lots of warnings even though the tests run successfully.Most of the warnings are about two calls to
ERB.new
. The unique warnings are:There are also a bunch of “errors” that don’t result in test failures. They are all identical: (Update: I split this out into #307)
I have tested this with Ruby 2.6.0p0 (not 2.3.0, see #301) and 3.1.2p20. In 2.6.0 the ERB warnings are not present, but the “ Failed to parse” messages are present in both.
Expected Behavior
No extra output when running unit tests.
Steps to Reproduce
Steps to reproduce the behavior:
bundle exec rake spec
Environment
The text was updated successfully, but these errors were encountered: