Sha256: b32de2baf907a9ff32b20878b1d382cd97d615411d69ea00d631815b8813f4c1

Contents?: true

Size: 667 Bytes

Versions: 6

Compression:

Stored size: 667 Bytes

Contents

require 'spec/helper'
require 'example/app/retro_games'

describe 'Retro-games app' do
  behaves_like :mock

  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

6 entries across 6 versions & 2 rubygems

Version Path
manveru-innate-2009.04.18 spec/example/app/retro_games.rb
manveru-innate-2009.04 spec/example/app/retro_games.rb
manveru-innate-2009.05 spec/example/app/retro_games.rb
innate-2009.04 spec/example/app/retro_games.rb
innate-2009.04.12 spec/example/app/retro_games.rb
innate-2009.05 spec/example/app/retro_games.rb