Improve docs and output about auto-runner
This commit is contained in:
		
							
								
								
									
										16
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								README.md
									
									
									
									
									
								
							| @@ -47,12 +47,16 @@ To run the koans, simply run | |||||||
|  |  | ||||||
| `script\run` on Windows | `script\run` on Windows | ||||||
|  |  | ||||||
|  | It's an auto-runner, so as you save your files with the correct answers, it will | ||||||
|  | advance you to the next koan or file. | ||||||
|  |  | ||||||
| You'll see something like this: | You'll see something like this: | ||||||
|  |  | ||||||
|     FAIL in clojure.lang.PersistentList$EmptyList@1 (equalities.clj:1) |     Problem in  /home/colin/Projects/clojure-koans/src/koans/equalities.clj | ||||||
|  |     --------------------- | ||||||
|  |     Assertion failed! | ||||||
|     We shall contemplate truth by testing reality, via equality. |     We shall contemplate truth by testing reality, via equality. | ||||||
|     expected: (= __ true) |     (= __ true) | ||||||
|       actual: (not (= :fill-in-the-blank true)) |  | ||||||
|  |  | ||||||
| The output is telling you that you have a failing test in equalities.clj. | The output is telling you that you have a failing test in equalities.clj. | ||||||
| So open that file up and make it pass!  In general, you just fill in the | So open that file up and make it pass!  In general, you just fill in the | ||||||
| @@ -64,9 +68,9 @@ so you'll have to pay close attention to the failure messages, because up until | |||||||
| the very end, making a test pass just means that the next failure message comes | the very end, making a test pass just means that the next failure message comes | ||||||
| up. | up. | ||||||
|  |  | ||||||
| While it's very easy (especially at first) to just fill in the blanks making | While it might be easy (especially at first) to just fill in the blanks making | ||||||
| things pass, you should work slowly, making sure you understand why the answer | things pass, you should work thoughtfully, making sure you understand why the | ||||||
| is what it is.  Enjoy your path to Clojure enlightenment! | answer is what it is.  Enjoy your path to Clojure enlightenment! | ||||||
|  |  | ||||||
|  |  | ||||||
| ### Trying more things out | ### Trying more things out | ||||||
|   | |||||||
| @@ -17,7 +17,6 @@ | |||||||
|     (let [these-koans (filter |     (let [these-koans (filter | ||||||
|                         (among-paths? refreshed-files) |                         (among-paths? refreshed-files) | ||||||
|                         (ordered-koan-paths))] |                         (ordered-koan-paths))] | ||||||
|       (println "Refreshing:" these-koans) |  | ||||||
|       (when (every? tests-pass? these-koans) |       (when (every? tests-pass? these-koans) | ||||||
|         (if-let [next-koan-file (file (next-koan-path (last these-koans)))] |         (if-let [next-koan-file (file (next-koan-path (last these-koans)))] | ||||||
|           (report-refresh {:reloaded [next-koan-file]}) |           (report-refresh {:reloaded [next-koan-file]}) | ||||||
| @@ -30,5 +29,6 @@ | |||||||
| (def scheduler (ScheduledThreadPoolExecutor. 1)) | (def scheduler (ScheduledThreadPoolExecutor. 1)) | ||||||
|  |  | ||||||
| (defn setup-freshener [] | (defn setup-freshener [] | ||||||
|  |   (println "Starting auto-runner...") | ||||||
|   (.scheduleWithFixedDelay scheduler refresh! 0 500 TimeUnit/MILLISECONDS) |   (.scheduleWithFixedDelay scheduler refresh! 0 500 TimeUnit/MILLISECONDS) | ||||||
|   (.awaitTermination scheduler Long/MAX_VALUE TimeUnit/SECONDS)) |   (.awaitTermination scheduler Long/MAX_VALUE TimeUnit/SECONDS)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user