Added --/++ markers around the dice class.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user