tracks/haskell/exercises/house/test/Tests.hs in trackler-2.1.0.11 vs tracks/haskell/exercises/house/test/Tests.hs in trackler-2.1.0.12
- old
+ new
@@ -6,23 +6,21 @@
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
-specs = describe "house" $
+specs = describe "rhyme" $ do
- describe "rhyme" $ do
+ -- First we test the input, line by line, to give more
+ -- useful error messages.
- -- First we test the input, line by line, to give more
- -- useful error messages.
+ it "matches lines" $ sequence_ lineAssertions
- it "matches lines" $ sequence_ lineAssertions
+ -- Finally, because testing lines we are unable
+ -- to detect a missing newline at the end of the
+ -- lyrics, we test the full song.
- -- Finally, because testing lines we are unable
- -- to detect a missing newline at the end of the
- -- lyrics, we test the full song.
-
- it "matches full song" $ rhyme `shouldBe` lyrics
+ it "matches full song" $ rhyme `shouldBe` lyrics
where
lineAssertions = zipWith checkLine [1 :: Int ..] $ zipMaybe (lines rhyme) (lines lyrics)
checkLine lineno (got, want) =