Sha256: 4a25dbc842e84083fa3b29615eac7b97a2da6f9ba9a819d3a4b6836db4f88bde

Contents?: true

Size: 1.62 KB

Versions: 368

Compression:

Stored size: 1.62 KB

Contents

(ns bob-test
  (:require [clojure.test :refer [deftest is]]
            bob))

(deftest responds-to-something
  (is (= "Whatever." (bob/response-for "Tom-ay-to, tom-aaaah-to."))))

(deftest responds-to-shouts
  (is (= "Whoa, chill out!" (bob/response-for "WATCH OUT!"))))

(deftest responds-to-questions
  (is (= "Sure."
         (bob/response-for "Does this cryogenic chamber make me look fat?"))))

(deftest responds-to-forceful-talking
  (is (= "Whatever." (bob/response-for "Let's go make out behind the gym!"))))

(deftest responds-to-acronyms
  (is (= "Whatever."
         (bob/response-for "It's OK if you don't want to go to the DMV."))))

(deftest responds-to-forceful-questions
  (is (= "Whoa, chill out!"
         (bob/response-for "WHAT THE HELL WERE YOU THINKING?"))))

(deftest responds-to-shouting-with-special-characters
  (is (= "Whoa, chill out!"
         (bob/response-for "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"))))

(deftest responds-to-shouting-numbers
  (is (= "Whoa, chill out!" (bob/response-for "1, 2, 3 GO!"))))

(deftest responds-to-shouting-with-no-exclamation-mark
  (is (= "Whoa, chill out!" (bob/response-for "I HATE YOU"))))

(deftest responds-to-statement-containing-question-mark
  (is (= "Whatever." (bob/response-for "Ending with ? means a question."))))

(deftest responds-to-silence
  (is (= "Fine. Be that way!" (bob/response-for ""))))

(deftest responds-to-prolonged-silence
  (is (= "Fine. Be that way!" (bob/response-for "    "))))

(deftest responds-to-only-numbers
  (is (= "Whatever." (bob/response-for "1, 2, 3"))))

(deftest responds-to-number-question
  (is (= "Sure." (bob/response-for "4?"))))

Version data entries

368 entries across 368 versions & 1 rubygems

Version Path
trackler-2.2.1.151 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.150 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.149 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.148 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.147 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.146 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.145 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.144 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.143 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.142 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.141 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.140 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.139 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.138 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.137 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.136 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.135 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.134 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.133 tracks/clojure/exercises/bob/test/bob_test.clj
trackler-2.2.1.132 tracks/clojure/exercises/bob/test/bob_test.clj