Skip to content

Commit

Permalink
kindergarten-garden 1.0.0.2: edit descriptions and elide middle stude…
Browse files Browse the repository at this point in the history
…nts (#525)

Descriptions are clearer as to the significance of the garden size, or
the fact that the given student list is non-alphabetical.

The tests of the middle children in the full garden are elided.

The canonical data file was added in exercism/problem-specifications#770
  • Loading branch information
petertseng authored May 8, 2017
1 parent 152be15 commit b51461e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
2 changes: 1 addition & 1 deletion exercises/kindergarten-garden/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: kindergarten-garden
version: 0.1.0.1
version: 1.0.0.2

dependencies:
- base
Expand Down
16 changes: 4 additions & 12 deletions exercises/kindergarten-garden/test/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
specs = describe "kindergarten-garden" $ do

it "alice tests" $ do
it "garden with single student" $ do

let alicePlants = lookupPlants "Alice" . defaultGarden

alicePlants "RC\nGG" `shouldBe` [ Radishes, Clover, Grass , Grass ]
alicePlants "VC\nRC" `shouldBe` [ Violets , Clover, Radishes, Clover ]

it "small garden" $ do
it "garden with two students" $ do

let plants s = lookupPlants s $ defaultGarden plantList
plantList = "VVCG\nVVRC"

plants "Bob" `shouldBe` [ Clover, Grass, Radishes, Clover ]

it "medium garden" $ do
it "garden with three students" $ do

let plants s = lookupPlants s $ defaultGarden plantList
plantList = "VVCCGG\nVVCCGG"
Expand All @@ -47,18 +47,10 @@ specs = describe "kindergarten-garden" $ do

plants "Alice" `shouldBe` [ Violets , Radishes, Violets , Radishes ]
plants "Bob" `shouldBe` [ Clover , Grass , Clover , Clover ]
plants "Charlie" `shouldBe` [ Violets , Violets , Clover , Grass ]
plants "David" `shouldBe` [ Radishes, Violets , Clover , Radishes ]
plants "Eve" `shouldBe` [ Clover , Grass , Radishes, Grass ]
plants "Fred" `shouldBe` [ Grass , Clover , Violets , Clover ]
plants "Ginny" `shouldBe` [ Clover , Grass , Grass , Clover ]
plants "Harriet" `shouldBe` [ Violets , Radishes, Radishes, Violets ]
plants "Ileana" `shouldBe` [ Grass , Clover , Violets , Clover ]
plants "Joseph" `shouldBe` [ Violets , Clover , Violets , Grass ]
plants "Kincaid" `shouldBe` [ Grass , Clover , Clover , Grass ]
plants "Larry" `shouldBe` [ Grass , Violets , Clover , Violets ]

it "surprise garden" $ do
it "non-alphabetical student list" $ do

let plants s = lookupPlants s $ garden students plantList
plantList = "VCRRGVRG\nRVGCCGCV"
Expand Down

0 comments on commit b51461e

Please sign in to comment.