 
 exports.Scenario = createScenario(['whitespace', 'label', 'style', 'pending'])
 
+
+createGiven = (options)->
+	return (message, callback)->
+		if 'label' in options
+			label = 'Given: '
+			if 'labelcolor' in options
+				label = label.yellow
+			message = label+message
+
+		mocha.it message, callback
+
+exports.Given = createGiven(['label', 'labelcolor'])
+
+createWhen = (options)->
+	return (message, callback)->
+		if 'label' in options
+			label = ' When: '
+			if 'labelcolor' in options
+				label = label.yellow
+			message = label+message
+
+		mocha.it message, callback
+
+exports.When = createWhen(['label', 'labelcolor'])
+
+createThen = (options)->
+	return (message, callback)->
+		if 'label' in options
+			label = ' Then: '
+			if 'labelcolor' in options
+				label = label.yellow
+			message = label+message
+
+		mocha.it message, callback
+
+exports.Then = createThen(['label', 'labelcolor'])
+
+createAnd = (options)->
+	return (message, callback)->
+		if 'label' in options
+			label = '  And: '
+			if 'labelcolor' in options
+				label = label.grey
+			message = label+message
+
+		mocha.it message, callback
+
+exports.And = createAnd(['label', 'labelcolor'])
+
+createBut = (options)->
+	return (message, callback)->
+		if 'label' in options
+			label = '  But: '
+			if 'labelcolor' in options
+				label = label.grey
+			message = label+message
+
+		mocha.it message, callback
+
+exports.But = createBut(['label', 'labelcolor'])
+
+createDescribe = (options)->
+	return (message, callback)->
+		if 'label' in options
+			message = "=== #{message} ==="
+
+		if 'color' in options
+			message = message.blue
+
+		mocha.describe message, callback
+
+exports.Describe = exports.Spec = createDescribe(['label', 'color'])
+
+
+###
 gwt = (label, args, options)->
 	[title, cb] = args_wash args
 

		mocha.describe message, callback

exports.Feature = createFeature(['label', 'whitespace', 'style'])

args_wash = (args)-  # allow blank  labels
	title = ''
	cb = undefined

	if typeof args[0] == 'string' or typeof args[1] == 'function'
		title = args[0]
		cb = args[1]
	else if typeof args[0] == 'function'
		cb = args[0]

	return [title, cb]

dic = (type, label, args, options={})->  # Dictate to describe() or it()

	options = _.extend
		padding:false
		padding_color:'green'
	, options

	if type in ['describe', 'it']

		[title, cb] = args_wash args

		if args.length == 1 and typeof args[0] == 'function'  # allow blank label
			label = ''
		else
			label = label.replace('%s', title)

		if options.pending
			if not cb or cb.toString() == (->).toString()  # If Blank
				label = '◊ '+_.clean(label.stripColors)+' (pending)'
				cb = null
				

		fn = ->
			if type is 'it' and not cb
				mocha[type] label
			else
				mocha[type] label, cb

		if options.padding  # NESTING Support
			mocha.describe '◦'[options.padding_color], ->
				fn()
		else
			fn()



createScenario = (options)->



	dic 'it', label, [title,cb], options

args_wash = (args)-  # allow blank  labels
	title = ''
	cb = undefined

	if typeof args[0] == 'string' or typeof args[1] == 'function'
		title = args[0]
		cb = args[1]
	else if typeof args[0] == 'function'
		cb = args[0]

	return [title, cb]

dic = (type, label, args, options={})->  # Dictate to describe() or it()

	options = _.extend
		padding:false
		padding_color:'green'
	, options

	if type in ['describe', 'it']

		[title, cb] = args_wash args

		if args.length == 1 and typeof args[0] == 'function'  # allow blank label
			label = ''
		else
			label = label.replace('%s', title)

		if options.pending
			if not cb or cb.toString() == (->).toString()  # If Blank
				label = '◊ '+_.clean(label.stripColors)+' (pending)'
				cb = null
				

		fn = ->
			if type is 'it' and not cb
				mocha[type] label
			else
				mocha[type] label, cb

		if options.padding  # NESTING Support
			mocha.describe '◦'[options.padding_color], ->
				fn()
		else
			fn()


exports.Given = ->
	gwt "Given:".yellow+" %s", arguments

