     setupFunction = o(thing).firstThat (arg) -> o(arg).isFunction()
     assignResultTo = o(thing).firstThat (arg) -> o(arg).isString()
     doneWrapperFor setupFunction, (done) ->
-      context = jasmine.getEnv().currentSpec
+      context = currentSpec
       result = setupFunction.call(context, done)
       if assignResultTo
         unless context[assignResultTo]

    for expectation, i in expectations
      do (expectation, i) ->
        doneWrapperFor expectation, (maybeDone) ->
          expect(expectation).not.toHaveReturnedFalseFromThen(jasmine.getEnv().currentSpec, i + 1, maybeDone)

  doneWrapperFor = (func, toWrap) ->
    if func.length == 0

  mostRecentlyUsed = null

  root = @

  currentSpec = null
  beforeEach ->
    currentSpec = this

  root.Given = ->
    mostRecentlyUsed = root.Given
