Skip to content

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