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 Marvel | |
class CharacterSpec: QuickSpec { | |
override func spec() { | |
describe("a character") { | |
var character: Marvel.Character! | |
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 Marvel | |
struct MarvelAPICallsMock: MarvelAPICalls { | |
let characters: [Marvel.Character] | |
func characters(query: String? = nil, completion: @escaping ([Marvel.Character]?) -> Void) { | |
completion(characters) | |
} |
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 Foundation | |
import Quick | |
import Nimble | |
@testable import Marvel | |
class CharactersDatasourceSpec: QuickSpec { | |
override func spec() { | |
describe("CharactersDatasource") { | |
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 Foundation | |
import Quick | |
import Nimble | |
@testable import Marvel | |
class CharactersDelegateMock: CharactersDelegate { | |
var didSelectRowTrigged = false | |
func didSelectCharacter(at index: IndexPath) { |
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
# Sometimes it's a README fix, or something like that - which isn't relevant for | |
# including in a project's CHANGELOG for example | |
declared_trivial = github.pr_title.include? "#trivial" | |
# Make it more obvious that a PR is a work in progress and shouldn't be merged yet | |
warn("PR is classed as Work in Progress") if github.pr_title.include? "[WIP]" | |
# Warn when there is a big PR | |
warn("Big PR") if git.lines_of_code > 500 |
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
language: objective-c | |
osx_image: xcode8.1 | |
cache: | |
- bundler | |
- cocoapods | |
before_install: | |
- bundle install | |
- bundle exec pod keys set MarvelApiKey $MARVEL_API_SECRET Marvel | |
- bundle exec pod keys set MarvelPrivateKey $MARVEL_API_PUBLIC Marvel | |
- pod repo update |
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 UIKit | |
import Reusable | |
import UIKit | |
final class CharacterTableCell: UITableViewCell { | |
var characterRow = CharacterRowView() | |
static func height() -> CGFloat { | |
return 80 | |
} |
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
// | |
// CharacterTableCell.swift | |
// Marvel | |
// | |
// Created by Thiago Lioy on 15/11/16. | |
// Copyright © 2016 Thiago Lioy. All rights reserved. | |
// | |
import UIKit | |
import Reusable |
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 Foundation | |
protocol ViewConfiguration: class { | |
func setupConstraints() | |
func buildViewHierarchy() | |
func configureViews() | |
} |
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 UIKit | |
final class CharacterViewController: UIViewController { | |
var characterView = CharacterView() | |
var character: Character? | |
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) { | |
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) | |
} | |