Kieran's RPS Challenge - #2114
Open
K-Carty wants to merge 2 commits into
Open
Conversation
LGretzk
reviewed
May 9, 2022
| end | ||
|
|
||
|
|
||
| class Game |
There was a problem hiding this comment.
I think the Game class should be separate from the app.rb file
LGretzk
reviewed
May 9, 2022
| when 3 | ||
| choice = "scissors" | ||
| end | ||
| end |
There was a problem hiding this comment.
it could be achieved with less code:
[:rock, :paper, :scissors].sample
LGretzk
reviewed
May 9, 2022
| require "capybara/rspec" | ||
| require_relative "../../app" | ||
|
|
||
| Capybara.app = RPS |
There was a problem hiding this comment.
I don't think the above is needed in the feature test spec
LGretzk
reviewed
May 9, 2022
| visit("/name") | ||
| expect(page).to have_button('submit') | ||
| end | ||
|
|
There was a problem hiding this comment.
the above is not testing for the choice
LGretzk
reviewed
May 9, 2022
LGretzk
left a comment
There was a problem hiding this comment.
Good division into controller and view, although controller needs to be further separated into model (and controller). The app behaves as expected. Some features tests are included, unit tests are missing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I managed to get my app working but need to add more feature and unit tests although I'm not sure on the rspec syntax how to write them. Also, I think the app could have better functionality by allowing user to click on buttons rather than type to submit their move.
I need help with testing and more knowledge on html to improve I think.