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

rps challenge - raphaella #2137

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

raphaella-rose
Copy link

No description provided.

Copy link

@BenjaminNeustadt BenjaminNeustadt left a comment

Choose a reason for hiding this comment

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

The tests are good, I personally like to write the controller first as it feels easier that way to know whether the get requests and post requests are working correctly. Very nice work

feature 'single player game' do
xscenario 'player selects rock' do
visit('/')
fill_in :player_name, with: 'Raphaella'

Choose a reason for hiding this comment

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

this test is comprehensive, and understandable. I just wonder whether you could use the web_helper 'sign in and play' here instead of fill_in[...]?

<div>Player: <%= @player_name %></div>
<div>Player: <%= @player.name %></div>
<form action='/weapon_selection' method='post'>
<input type='submit' value='Rock' name='weapon'>

Choose a reason for hiding this comment

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

this is really nice, I am going to try implement something in my own code.

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.

2 participants