Permalink
Browse files

Merge branch `redundant` into `master`.

  • Loading branch information...
2 parents 7f808a0 + d0c88f2 commit 91c28f9edbf64ea60cbbbbd21918c544412ef37a @bigeasy committed Apr 30, 2012
View
@@ -14,6 +14,6 @@ branches:
before_install:
- npm install
- - npm install coffee-script proof streamline@0.2.4 streamliner_
+ - npm install coffee-script proof streamline
- git submodule init && git submodule update
- cake compile
View
@@ -3,8 +3,7 @@
, "version": "0.0.1"
, "author": "Alan Gutierrez"
, "directories": { "lib" : "./lib" }
-, "devDependencies": { "coffee-script": ">=1.1.3"
- , "proof": ">=0.0.1" }
+, "devDependencies": { "coffee-script": ">=1.1.3" }
, "scripts": { "test": "./bin/proof t/*/*.t" }
, "main": "./lib/proof"
, "bin": { "proof": "./bin/proof" }
@@ -436,7 +436,7 @@ create = ->
process.stdout.write "\\n"
""", "utf8"
- fs.chmodSync name, 0755
+ fs.chmodSync name, 0o755
output = ""
inspect = spawn name
inspect.stderr.setEncoding "utf8"
@@ -464,6 +464,6 @@ create = ->
# Here be dragons.\n
""", "utf8"
- fs.chmodSync name, 0755
+ fs.chmodSync name, 0o755
({ create, piped, json, run, progress })[action]()
@@ -196,7 +196,9 @@ for name, assertion of require("assert")
assertion.apply @, splat
process.stdout.write "ok #{++@_actual} #{message}\n"
catch e
- process.stdout.write "not ok #{++@_actual} #{message} # #{e.message}\n"
+ # Recall that the assertion message is the same as the assertion
+ # exception message.
+ process.stdout.write "not ok #{++@_actual} #{e.message}\n"
EXPECTED = if name is "ok" then true else splat[1]
inspect = { EXPECTED, GOT: splat[0] }
inspect = require("util").inspect inspect, null, Math.MAX_VALUE
@@ -3,7 +3,7 @@ require("./proof") 1, ({ fs, exec, tmp }, _) ->
program = "#{tmp}/example.sh"
fs.writeFile program, "#!/bin/bash\nexit 1\n", "utf8", _
- fs.chmod program, 0755, _
+ fs.chmod program, 0o755, _
try
exec program, _
@@ -1,14 +1,13 @@
#!/usr/bin/env _coffee
-mysql = require "mysql"
fs = require "fs"
{exec} = require "child_process"
-module.exports = require("proof") (_) ->
+module.exports = require("../../lib/proof") (_) ->
tmp = "#{__dirname}/tmp"
@cleanup _, (_) ->
try
fs.unlink "#{tmp}/#{file}", _ for file in fs.readdir tmp, _
fs.rmdir tmp, _
catch e
throw e if e.code isnt "ENOENT"
- fs.mkdir tmp, 0755, _
+ fs.mkdir tmp, 0o755, _
{ fs, exec, tmp }
View
@@ -1,5 +1,5 @@
#!/usr/bin/env _coffee
-require("proof") 1, (_) ->
+require("../../lib/proof") 1, (_) ->
fs = require "fs"
{exec} = require "child_process"
@@ -12,7 +12,7 @@ require("proof") 1, (_) ->
throw e if e.code isnt "ENOENT"
fs.writeFile program, "#!/bin/bash\nexit 1\n", "utf8", _
- fs.chmod program, 0755, _
+ fs.chmod program, 0o755, _
try
exec program, _
@@ -3,4 +3,4 @@ context =
instance: 1
model: 2
controller: 3
-module.exports = require("proof") context
+module.exports = require("../../lib/proof") context
View
@@ -1,5 +1,5 @@
#!/usr/bin/env coffee
-require("proof") 3, ->
+require("../../lib/proof") 3, ->
@ok true, "truth works"
@equal 1 + 1, 2, "math works"
@deepEqual "a b".split(/\s/), [ "a", "b" ], "strings work"
View
@@ -1,4 +1,4 @@
#!/usr/bin/env _coffee
-require("proof") 2, (_) ->
+require("../../lib/proof") 2, (_) ->
e = @throws "asynchronous", _, (_) -> throw new Error("asynchronous")
@equal e.message, "asynchronous", "returned"
View
@@ -1,4 +1,4 @@
#!/usr/bin/env coffee
-require("proof") 2, ->
+require("../../lib/proof") 2, ->
e = @throws "synchronous", -> throw new Error("synchronous")
@equal e.message, "synchronous", "returned"

0 comments on commit 91c28f9

Please sign in to comment.