Skip to content

Instantly share code, notes, and snippets.

@NilStack
Created September 20, 2016 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NilStack/b3aceda29b09904d67580e2682062228 to your computer and use it in GitHub Desktop.
Save NilStack/b3aceda29b09904d67580e2682062228 to your computer and use it in GitHub Desktop.
a simple and complete example in Quick
import Quick
import Nimble
@testable import MyGreatApp
class LoginViewControllerSpec: QuickSpec {
override func spec() {
var viewController: LoginViewController!
beforeEach {
let storyboard = UIStoryboard(name: "Main",
bundle: Bundle(for: type(of: self)))
viewController = storyboard.instantiateInitialViewController() as! LoginViewControllerSpec
let _ = viewController.view
}
describe("initial state") {
context("UI components in the controller's view ") {
it("login label") {
expect(viewController.loginLabel).notTo(beNil())
expect(viewController.loginLabel.text).to(equal("Login"))
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment