im.yagni.driveby.conditions.TitleEquals.scala Maven / Gradle / Ivy
The newest version!
package im.yagni.driveby.conditions
import im.yagni.driveby.{Condition, Describer}
import im.yagni.driveby.browser.UnSafeBrowser
object TitleEquals {
import Describer._
def apply(expected: String) = new Condition {
def expectation = expect("TitleEquals", List(expected))
def isSatisfied(browser: UnSafeBrowser) = { browser.title == expected }
def describeFailure(browser: UnSafeBrowser) = { expectation + butWas(() => browser.title) }
}
}