From 3dab146b8dd49c974dc3fb35dad3f86c3bd61fa5 Mon Sep 17 00:00:00 2001 From: Jim Weirich Date: Thu, 23 Dec 2010 09:26:55 -0500 Subject: [PATCH] Added --/++ markers around the dice class. --- koans/about_dice_project.rb | 11 +++++------ src/about_dice_project.rb | 8 ++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/koans/about_dice_project.rb b/koans/about_dice_project.rb index a01236a..ce81715 100644 --- a/koans/about_dice_project.rb +++ b/koans/about_dice_project.rb @@ -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 diff --git a/src/about_dice_project.rb b/src/about_dice_project.rb index a01236a..65c21df 100644 --- a/src/about_dice_project.rb +++ b/src/about_dice_project.rb @@ -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