 
   ran = false
 
-  fn1 = (ctx) -> ran = true
+  fn1 = -> ran = true
 
   chain.add fn1
 


  context = ran1:false, ran2:false

  fn1 = (ctx) -> ctx.ran1 = true
  fn1.options = id:'fn1'

  fn2 = (ctx) -> ctx.ran2 = true
  fn2.options = id:'fn2'

  chain.add fn1

  test.equal ran, true, 'chain execution should cause fn1 to set ran to true'


Tinytest.add 'test single function using context via this', (test) ->

  chain = new Chain()

  context = ran:false

  fn1 = -> this.ran = true

  chain.add fn1

  chain.execute context

  test.equal context.ran, true, 'chain execution should cause fn1 to set context.ran to true'

Tinytest.add 'test single function using context via context var', (test) ->

  chain = new Chain()

  context = ran:false

  fn1 = (_, ctx) -> ctx.ran = true

  chain.add fn1

