# Zest: Zero repetition testing

#--------------------------------#
# Calc: Really simple calculator #
#--------------------------------#
# Examples:
# > c = new Calc()
# > assert c.add(2,5) == 7
#
# > c = new Calc(reverse: true)
# > assert c.add(5,2) == 3
class Calc
	add: (a,b)->
		a+b	

class Zest
	constructor: (@cls)->

	init: (fn)->

	beforeEach: (fn)->

	afterEach: (fn)->

	test: (fn)->

	scenario: (fn)->

	run: (module)->

z = new Zest(ServiceRpc)

z = new Zest(rpc: ServiceRpc, ajax: ServiceRpc)

z = new Zest ()-> {rpc: new ServiceRpc(), ajax: new Ajax()}

z.scenario 'assfasfaf', ()-> 
	new ServiceRpc()

z.test 'This should do that', ->
	@it.doSomething()
	@assert @it == 22, 'afasf'
	@assert @it.name == 'bob jones', 'afasdf'

z.test 'This should do the other', -> 
	@assert @it == 22, 'afasf'
	@assert @it.name == 'bob jones', 'afasdf'

z.scenario 'assfasfaf', ()-> 
	new ServiceRpc()
z.test 'This should do that', ->
	@assert @it == 22, 'afasf'
	@assert @it.name == 'bob jones', 'afasdf'

z.run(module) 

