]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/rspec-1.1.2/examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb
Show whether a trace is public or private in the trace list, so that a user can easil...
[rails.git] / vendor / gems / rspec-1.1.2 / examples / stories / game-of-life / behaviour / stories / kill_a_cell.rb
1 require File.join(File.dirname(__FILE__), *%w[helper])
2
3 Story 'I can kill a cell',
4   %(As a game producer
5   I want to kill a cell
6   So that when I make a mistake I don't have to start again), :steps_for => :life do
7   
8   Scenario "bang, you're dead" do
9     
10     Given 'a game that looks like', %(
11       XX.
12       .X.
13       ..X
14     ) do |dots|
15       @game = Game.from_string dots
16     end
17     When 'I destroy the cell at', 0, 1 do |row,col|
18       @game.destroy_at(row,col)
19     end
20     Then 'the grid should look like', %(
21       X..
22       .X.
23       ..X
24     )
25   end
26 end