Sha256: f576d0ae95edb030b8c6a55871485d6e6cbbaa0ab00f3eff69d3da3823fefae9

Contents?: true

Size: 744 Bytes

Versions: 11

Compression:

Stored size: 744 Bytes

Contents

require File.expand_path('../../../helper', __FILE__)
require File.expand_path('../../../../example/app/retro_games', __FILE__)

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 =~ /<form/
  end

  it 'allows you to add another game' do
    post '/create', :name => 'Street Fighter II'
    follow_redirect!
    last_response.should =~ /0 =&gt; Street Fighter II/
  end

  it 'allows you to vote for a game' do
    get '/vote/Street+Fighter+II'
    follow_redirect!
    last_response.should =~ /1 =&gt; Street Fighter II/
  end

  FileUtils.rm_f('games.yaml')
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
manveru-innate-2009.07 spec/example/app/retro_games.rb
innate-2011.10 spec/example/app/retro_games.rb
innate-2011.04 spec/example/app/retro_games.rb
innate-2011.01 spec/example/app/retro_games.rb
innate-2010.07 spec/example/app/retro_games.rb
innate-2010.06.18 spec/example/app/retro_games.rb
innate-2010.04 spec/example/app/retro_games.rb
innate-2010.03 spec/example/app/retro_games.rb
innate-2010.01 spec/example/app/retro_games.rb
innate-2009.10 spec/example/app/retro_games.rb
innate-2009.07 spec/example/app/retro_games.rb