Skip to content
Browse files

fixed assert

  • Loading branch information...
1 parent 66bb955 commit f77cb559bfada3b407b947ce3366eccee2d85c89 @DorianGray DorianGray committed Aug 8, 2012
Showing with 4 additions and 3 deletions.
  1. +0 −1 busted.lua
  2. +4 −2 lib/assert.lua
View
1 busted.lua
@@ -2,7 +2,6 @@ local json = require("dkjson")
local ansicolors = require("lib/ansicolors")
local global_context = { type = "describe", description = "global" }
local current_context = global_context
-original_assert = assert
assert = require("lib/assert")
local busted_options = {}
View
6 lib/assert.lua
@@ -19,8 +19,10 @@ local function deepcompare(t1,t2,ignore_mt)
end
local __meta = {
- __call = function(...)
- return original_assert(...)
+ __call = function(self, bool, message)
+ if not bool then
+ error(message)
+ end
end
}

0 comments on commit f77cb55

Please sign in to comment.
Something went wrong with that request. Please try again.