Created
September 20, 2016 07:51
-
-
Save NilStack/b3aceda29b09904d67580e2682062228 to your computer and use it in GitHub Desktop.
a simple and complete example in Quick
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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