it 'accepts a player name'do
get '/', From: 'Dude4'
get '/', From: 'Dude4', Body: 'NameOfDude4'
get '/', From: 'Dude4'
get '/', From: 'Dude4'
expect(last_response.body).to include("You're NameOfDude4, a student at Beholder High.")
end
it 'uses the right player name'do
get '/', From: 'Dude5'
get '/', From: 'Dude5', Body: 'NumberFive'
get '/', From: 'Dude6'
get '/', From: 'Dude6'
get '/', From: 'Dude5'
get '/', From: 'Dude5'
expect(last_response.body).to include("You're NumberFive, a student at Beholder High.")
end
it 'accepts a player name'do
get '/', From: 'Dude4'
get '/', From: 'Dude4', Body: 'NameOfDude4'
get '/', From: 'Dude4'
get '/', From: 'Dude4'
and will only get worse as we progress. A purist would dictate that this should be addressed in the
test code (and I probably will at some point), but let’s use this opportunity to implement a cheat
code in the game itself (to be used purely for testing, of course).
it 'lets you skip to a different state for testing'do
get '/', From: 'Dude7', SkipToState: 'D1S107'
expect(last_response.body).to include("Your brooding has distracted you")
end