im.yagni.driveby.specs2.DriveBySpecification.scala Maven / Gradle / Ivy
The newest version!
package im.yagni.driveby.specs2
import im.yagni.driveby.failure.FailureReporting
import im.yagni.driveby.pool.PooledBrowsers
import im.yagni.driveby.tracking.{SpecificationTracking, ExampleTracking}
import im.yagni.driveby.browser.{Browser, TrackedBrowser}
import im.yagni.driveby.Example
trait DriveBySpecification extends NakedDriveBySpecification with SpecificationTracking {
self: SpecificationTracking =>
trait DriveByExample[T] extends NakedDriveByExample[T] with SpecificationAware with ExampleTracking[T] with FailureReporting[T] with PooledBrowsers[T] {
def specification = self.specification
var browser: Browser = _
override def beforeExample = wrapBrowserAsTracked _ :: super.beforeExample
private def wrapBrowserAsTracked(example: Example) { browser = new TrackedBrowser(pooledBrowser, example.id) }
}
}