Skip to content

Instantly share code, notes, and snippets.

@badrinathvm
Last active October 14, 2017 22:46
Show Gist options
  • Save badrinathvm/5d261915dcc4a1f396e394973a297296 to your computer and use it in GitHub Desktop.
Save badrinathvm/5d261915dcc4a1f396e394973a297296 to your computer and use it in GitHub Desktop.
file containing expects
//class check
expect(watch).to(beAKindOf(Watch.self))
expect(watch).toNot(beAKindOf(Dummy.self))
//instance check
expect(watch).to(beAnInstanceOf(Watch.self))
expect(watch).toNot(beAnInstanceOf(Dummy.self))
//string and name presence check
expect(watch.name).to(beAnInstanceOf(String.self))
expect(watch.name).to(contain("Men's Business Quartz Watch CAGNARY 6828"))
expect(brandInformation.name).to(equal("CAGARNY"))
expect(brandInformation.name).to(beginWith("CAG"))
//nil check
expect(brandInformation.name).toNot(beNil())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment