changelog shortlog tags changeset manifest revisions annotate raw

vendor/plugins/rspec/examples/stories/game-of-life/behaviour/stories/kill_a_cell.rb

changeset 15: 64acf98d15f4
author: moriq@moriq.com
date: Mon Mar 10 10:12:58 2008 +0900 (16 years ago)
permissions: -rw-r--r--
description: add plugins rspec
1require File.join(File.dirname(__FILE__), *%w[helper])
2
3Story '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
26end