Skip to content

Instantly share code, notes, and snippets.

View simlun's full-sized avatar

Simon Lundmark simlun

View GitHub Profile
@simlun
simlun / euler.clj
Created July 6, 2012 09:17
euler001
(ns euler001.euler)
(defn- zerorem?
[numer denom]
(= 0 (rem numer denom)))
(defn divis?
[a]
(or
(zerorem? a 3)
@simlun
simlun / acceptance_test.sh
Created July 6, 2012 06:45
ATDD shell scripting using shUnit2
#!/bin/sh
# Setup
SUT=../system_under_test.sh
INPUT_FILE=sample_input.txt
EXPECTED_OUTPUT_FILE=expected_output.txt
EXPECTED_STATUS_CODE=0
# The test
testStatusCodeAndResponse()