 			delete @currentTest.ctx[i] for i of @currentTest.ctx when i not in @currentTest.ctxKeys
 
 		Given = ->
-			args = Array.prototype.slice.call arguments
-			if args.length == 1
-				context.beforeEach.apply @, args
+			assignTo = o(arguments).firstThat (arg) -> o(arg).isString()
+			fn = o(arguments).firstThat (arg) -> o(arg).isFunction()
+			if assignTo
+				context.beforeEach -> @[assignTo] = fn.apply @
 			else
-				assignTo = o(args).firstThat (arg) -> o(arg).isString()
-				fn = o(args).firstThat (arg) -> o(arg).isFunction()
-				context.beforeEach ->
-					@[assignTo] = fn.call @
-
-		When = (fn) ->
-			context.beforeEach -> whenList.push(fn)
-			context.afterEach  -> whenList.pop()
+				context.beforeEach.apply @, Array.prototype.slice.call arguments
+
+		When = ->
+			assignTo = o(arguments).firstThat (arg) -> o(arg).isString()
+			fn = o(arguments).firstThat (arg) -> o(arg).isFunction()
+			if assignTo
+				context.beforeEach -> whenList.push(-> @[assignTo] = fn.apply @)
+			else
+				context.beforeEach -> whenList.push(fn)
+
+			context.afterEach ->
+				whenList.pop()
 
 		Then = ->
 			declareSpec arguments, context.it

	suites = [suite]

	suite.on 'pre-require', (context, file, mocha) ->

		# reset context for watched tests
		suite.ctx = new Context

	label = o(specArgs).firstThat (arg) -> o(arg).isString()
	fn    = o(specArgs).firstThat (arg) -> o(arg).isFunction()
	itFunc "then #{label ? stringifyExpectation(fn)}", (done) ->
		i.apply @ for i in whenList if whenList.length
		try
			if o(fn).hasArguments()
				expect(fn.apply(@, Array.prototype.slice.call(arguments))).to.be.ok()
			else
				expect(fn.apply(@)).to.be.ok()
				done()
		catch exception
			msg = exception.message
