Skip to content

Instantly share code, notes, and snippets.

@rnewman
Created December 19, 2014 19:38
Show Gist options
  • Save rnewman/57bc73e6f6afd4e624e3 to your computer and use it in GitHub Desktop.
Save rnewman/57bc73e6f6afd4e624e3 to your computer and use it in GitHub Desktop.
Bizarre log output
class TestAccountManager : AccountProfileManager {
override func login(username: String, password: String, error: ((error: RequestError) -> ())) {
let credential = NSURLCredential(user: username, password: password, persistence: .None)
let account = MockAccountProfile()
self.loginCallback(account: account)
return
...
let am = TestAccountManager(loginCallback: { (profile: Profile) -> Void in
ranTest = true
println("PRODUCED PROFILE ", profile.localName())
...
class MockAccountProfile: AccountProfile {
private let name: String = "mockaccount"
init() {
}
func localName() -> String {
return name
}
var accountName: String {
get {
return "[email protected]"
}
}
...
Test Case '-[ClientTests.TestBookmarks testBookmarks]' started.
(PRODUCED PROFILE , [email protected])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment