require 'spec/helper' require 'example/app/retro_games' describe 'Retro-games app' do behaves_like :rack_test it 'lists the first game' do get '/' last_response.should =~ /1 => Pacman/ end it 'has a form to add another game' do get '/' last_response.should =~ /
'Street Fighter II' follow_redirect! last_response.should =~ /0 => Street Fighter II/ end it 'allows you to vote for a game' do get '/vote/Street+Fighter+II' follow_redirect! last_response.should =~ /1 => Street Fighter II/ end FileUtils.rm_f('games.yaml') end