Browse files

test that nothing is cached

  • Loading branch information...
1 parent 9681b4f commit 85170d5f2144f26253b1b24b22512b0adec7d77d @ddollar ddollar committed Mar 27, 2012
Showing with 15 additions and 1 deletion.
  1. +15 −1 bin/test
View
16 bin/test
@@ -33,6 +33,13 @@ testPackageJsonWithoutVersion() {
assertCapturedSuccess
}
+testNothingCached() {
+ cache=$(mktmpdir)
+ compile "package-json-version" $cache
+ assertCapturedSuccess
+ assertEquals "0" "$(ls -1 $cache | wc -l)"
+}
+
## utils ########################################
pushd $(dirname 0) >/dev/null
@@ -41,12 +48,19 @@ popd >/dev/null
source ${BASE}/vendor/test-utils/test-utils
+mktmpdir() {
+ dir=$(mktemp -t testXXXXX)
+ rm -rf $dir
+ mkdir $dir
+ echo $dir
+}
+
detect() {
capture ${BASE}/bin/detect ${BASE}/test/$1
}
compile() {
- capture ${BASE}/bin/compile ${BASE}/test/$1
+ capture ${BASE}/bin/compile ${BASE}/test/$1 $2
}
source ${BASE}/vendor/shunit2/shunit2

0 comments on commit 85170d5

Please sign in to comment.