Commit 03b0f624 authored by Joe Libipl's avatar Joe Libipl
Browse files

Linting

parent dddb143b
Pipeline #8768728 failed with stage
in 1 minute and 11 seconds
require 'sinatra/base'
#
# Sinatra-derived class for easy testing
class SMSBeholder < Sinatra::Base
player_states = {}
game_states = JSON.parse(File.open("script.json", 'r').read)
game_states = JSON.parse(File.open('script.json', 'r').read)
get '/' do
source = params['From']
......@@ -17,5 +16,5 @@ class SMSBeholder < Sinatra::Base
response
end
run! if app_file == $0
end
\ No newline at end of file
run! if app_file == $PROGRAM_NAME
end
......@@ -11,22 +11,21 @@ describe SMSBeholder do
it 'responds with initial state' do
get '/', From: 'Dude1'
expect(last_response.body).to include('Please tell me your name.')
end
it 'responds with initial state for each player' do
get '/', From: 'Dude1'
get '/', From: 'Dude2'
expect(last_response.body).to include('Please tell me your name.')
end
it 'moves to second state' do
get '/', From: 'Dude3'
get '/', From: 'Dude3'
expect(last_response.body).to include('Day One.')
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment