(function(){
  var ConsoleTestRunner = Evidence.AutoRunner.RUNNERS.console,
      ConsoleTestResult = Evidence.UI.Console.TestResult,
      AutoRunner = Evidence.AutoRunner,
      printf = Evidence.UI.printf

  function inherit(superclass, extra) {
    var klass = function(){
      this.initialize.apply(this, arguments)
    }
    var tmp = function(){}
    tmp.prototype = superclass.prototype
    klass.prototype = new tmp()
    klass.prototype.constructor = klass
    klass.prototype.initialize = function(){
      superclass.apply(this, arguments)
    }

    if (extra) {
      var methods = extra.call(klass, superclass.prototype)
      for (var method in methods) klass.prototype[method] = methods[method]
    }
    return klass
  }

  var TestRunner = inherit(ConsoleTestRunner, function(_super) {
    Evidence.AutoRunner.RUNNERS.zepto = this
    return {
      _makeResult: function() { return new TestResult(this.logger) }
    }
  })

  var TestResult = inherit(ConsoleTestResult, function(_super) {
    return {
      stop: function(t1) {
        _super.stop.call(this, t1)
        displayResults(this, (t1-this.t0)/1000)
        checkLeakedGlobals()
      }
    }
  })

  // HACK: force our test runner as default
  ;(function(){
    var _super = AutoRunner.prototype.retrieveOptions
    AutoRunner.prototype.retrieveOptions = function() {
      var options = _super.call(this)
      if (!options.runner) options.runner = 'zepto'
      return options
    }
  })()

  function $(id) { return document.getElementById(id) }

  function displayResults(results, seconds) {
    var container = $('results')
    if (container) {
      if (results.failureCount || results.errorCount) {
        container.innerHTML = printf("Finished in %d s. &ndash; <em>%d failures, %d errors</em>",
          [seconds, results.failureCount, results.errorCount])
        container.className = 'failed'
      } else {
        container.innerHTML = printf("Finished in %d s. &ndash; <em>%d tests passed</em>", [seconds, results.testCount])
        container.className = 'passed'
      }
    }
  }

  var globals = [], expected = ['Zepto', '$', 'Evidence']
  for (var key in window) globals.push(key)

  function checkLeakedGlobals() {
    for (var key in window) if (globals.indexOf(key) < 0 && expected.indexOf(key) < 0)
      if (window.console && console.warn) console.warn("unexpected global: ", key)
  }
})()
@@ -2210,24 +2210,77 @@
 Globals() %7B%0A
+    var opera = /%5EOpera%5Cb/.test(navigator.userAgent)%0A
     for (var
@@ -2294,21 +2294,28 @@
  window)
+%0A     
  if (
+ 
 globals.
@@ -2359,28 +2359,111 @@
 key) %3C 0
-)%0A
+ &&%0A 
       
-if (
+   (!opera %7C%7C typeof window%5Bkey%5D != 'object' %7C%7C window%5Bkey%5D.id != key) &&%0A          
 window.c
@@ -2484,17 +2484,36 @@
 ole.warn
-)
+%0A          )%0A       
  console
@@ -2539,17 +2539,18 @@
 lobal: %22
-,
+ +
  key)%0A  
@@ -2551,12 +2551,13 @@
 ey)%0A  %7D%0A%7D)()
+%0A

fix checking of leaked globals in Opera