Added --/++ markers around the dice class.

This commit is contained in:
Jim Weirich
2010-12-23 09:26:55 -05:00
parent 0b9727f299
commit 3dab146b8d
2 changed files with 13 additions and 6 deletions

View File

@@ -1,11 +1,10 @@
require File.expand_path(File.dirname(__FILE__) + '/edgecase')
class DiceSet
attr_reader :values
def roll(n)
@values = (1..n).map { rand(6) + 1 }
end
end
# Implement a DiceSet Class here:
#
# class DiceSet
# code ...
# end
class AboutDiceProject < EdgeCase::Koan
def test_can_create_a_dice_set

View File

@@ -1,5 +1,12 @@
require File.expand_path(File.dirname(__FILE__) + '/edgecase')
# Implement a DiceSet Class here:
#
# class DiceSet
# code ...
# end
#--
class DiceSet
attr_reader :values
def roll(n)
@@ -7,6 +14,7 @@ class DiceSet
end
end
#++
class AboutDiceProject < EdgeCase::Koan
def test_can_create_a_dice_set
dice = DiceSet.new