Skip to content

Instantly share code, notes, and snippets.

@cawel
Created January 20, 2009 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cawel/49745 to your computer and use it in GitHub Desktop.
Save cawel/49745 to your computer and use it in GitHub Desktop.
require 'sinatra'
require 'sinatra/test/rspec'
require File.join(File.dirname(__FILE__), '../../server.rb')
Dir.chdir('../../')
describe 'Game logic' do
it 'should be able to play in 0,0' do
get '/new' #this route assigns data in session
post '/play', :x => 0, :y => 0 #this route cannot retrieve data from session
@response.should be_ok
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment