Skip to content

Conversation

@katrinleinweber
Copy link
Contributor

Thanks to @iHiD's advice in #41, I think this resolves #40 in a more complete way:

  1. Documents the advice
  2. docker build . succeeds
  3. bundle exec rake test as well: 12 runs, 21 assertions, 0 failures, 0 errors, 0 skips

This PR also bumps gems to newer versions:

  • mandate, as advised
  • json, to resolve ArgumentError: wrong number of arguments (given 2, expected 1) in TestRunnerTest#…
  • parser, to stop warning: parser/current is loading parser/ruby27, which recognizes 2.7.x-compliant syntax, but you are running 3.0.2.

Additionally, a blanket bundle update could also be added here.

@katrinleinweber katrinleinweber requested a review from a team as a code owner November 5, 2021 21:14
@katrinleinweber katrinleinweber mentioned this pull request Nov 5, 2021
@kotp
Copy link
Member

kotp commented Nov 5, 2021

That (the current failure) is strange, because the README from setup-ruby says:

1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 3.0.2, head, debug, mingw, mswin

@kotp
Copy link
Member

kotp commented Nov 5, 2021

Don't forget to specify the Ruby version in the Gemfile as well. It might be the reason for the failure(??).

^
SYNTAX_ERRORS
assert_equal expected.strip, actual['message']
assert_equal expected, actual['message']
Copy link
Member

Choose a reason for hiding this comment

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

What's the reason for these changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without that, 2 tests fail:

|   1) Failure:
| TestRunnerTest#test_syntax_errors_in_tests [/Users/katrinleinweber/Exercism.io/ruby-test-runner/test/test_runner_test.rb:111]:
| Expected: "Line 3: syntax error, unexpected ',', expecting end-of-input\n,'This is meant to be a syntax...\n^"
|   Actual: "Line 3: syntax error, unexpected ',', expecting end-of-input\n,'This is meant to be a syntax...\n^\n"
| 
|   2) Failure:
| TestRunnerTest#test_syntax_errors_in_code [/Users/katrinleinweber/Exercism.io/ruby-test-runner/test/test_runner_test.rb:127]:
| Expected: "Line 2: syntax error, unexpected ',', expecting end-of-input\nend,A stray comma\n   ^"
|   Actual: "Line 2: syntax error, unexpected ',', expecting end-of-input\nend,A stray comma\n   ^\n"
| 
| 12 runs, 19 assertions, 2 failures, 0 errors, 0 skips

I added an explanation to the description of 7cdb940 ;-)

@iHiD
Copy link
Member

iHiD commented Nov 6, 2021

@katrinleinweber Great. Thanks! I'll release a proper mandate version too. You ok to try and get the rubocop thing fixed or want me to look at it?

@katrinleinweber katrinleinweber force-pushed the update-to-ruby-3.0.2 branch 2 times, most recently from 1ec5c50 to 14d623c Compare November 6, 2021 10:32
@katrinleinweber
Copy link
Contributor Author

katrinleinweber commented Nov 6, 2021

… You ok to try and get the rubocop thing fixed or want me to look at it?

I though a62c037 would do that, but I forgot he second occurrence m-( Fixed now & force-pushed. @kotp


Edit: Whoa! That somehow included earlier commits & closed the PR. Sorry about that! I think I confused GitHub with a shallow clone of my fork, and a filter-repo to update my email address.

@iHiD: Could you please reopen? It should be all cleaned up now.

Either json 2.6.1 or File.write seems to append an additional \n
at the end of the parsed results.json. Thus, both assertion
argument need to be treated the same now.
@iHiD
Copy link
Member

iHiD commented Nov 6, 2021

I can't reopen - it won't let me. Have you deleted the branch maybe?

@Steffan153
Copy link

This helpful? https://gist.github.com/robertpainsi/2c42c15f1ce6dab03a0675348edd4e2c

@katrinleinweber
Copy link
Contributor Author

katrinleinweber commented Nov 8, 2021

Thank you, @Steffan153 :-)

@iHiD I'm fine with either option (☝️ or a new PR). I didn't delete update-to-ruby-3.0.2 but pushed a 2nd copy just now.

Both branches now include @kotp's suggestion to also set ruby '3.0.2' in the Gemfile.

@iHiD
Copy link
Member

iHiD commented Nov 8, 2021

Could you put another PR up then pls :)

@katrinleinweber
Copy link
Contributor Author

Sure thing: #48 :-)

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.

Tests for Word Count pass locally with Ruby 2.6 but fail on Exercism website because test runner is using Ruby 2.5.9

5 participants