about summary refs log tree commit diff
path: root/test/pronouns/pages_test.clj
blob: 04c14ce8f47badc7a11cef40739a44959e160119 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
(ns pronouns.pages-test
  (:require [pronouns.pages :as pages]
            [midje.sweet :refer :all]))

(fact "prose-comma-list turns a list of strings into a prose list with commas"
      (pages/prose-comma-list ["foo"]) => "foo"
      (pages/prose-comma-list ["foo" "bar"]) => "foo and bar"
      (pages/prose-comma-list ["foo" "bar" "baz"]) => "foo, bar, and baz"
      (pages/prose-comma-list ["foo" "bar" "baz" "bobble"]) => "foo, bar, baz, and bobble"
      (pages/prose-comma-list []) => "")