Permalink
Browse files

added a Makefile and fixed APIKEY path for tests

  • Loading branch information...
1 parent a23e7b0 commit bc5748dbab9654e655a1260b92e9deae5007d0d2 @impronunciable impronunciable committed May 16, 2012
Showing with 12 additions and 1 deletion.
  1. +11 −0 Makefile
  2. +1 −1 test/test.js
View
@@ -0,0 +1,11 @@
+ALL_TESTS = $(shell find test/ -name '*test.js')
+
+run-tests:
+ @./node_modules/.bin/mocha \
+ $(TESTFLAGS) \
+ $(TESTS)
+
+test:
+ @$(MAKE) NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests
+
+.PHONY: test
View
@@ -1,6 +1,6 @@
var fs = require('fs');
var should = require('should');
-var key = new String(fs.readFileSync('APIKEY')).replace(/(\r\n|\n|\r)/gm,"");
+var key = new String(fs.readFileSync(__dirname + '/APIKEY')).replace(/(\r\n|\n|\r)/gm,"");
var tmdb = require('../lib/tmdb').init(key);
describe("General methods", function() {

0 comments on commit bc5748d

Please sign in to comment.