describe a Gun
- describe shoot
- describe lock
- describe unlock
describe a Gun
describe Gun
describe a Gun
describe Gun
| import XCTest | |
| @testable import MyAwesomeProject | |
| class MyNativeTests: XCTestCase { | |
| func testGunCanShootIfItHasBullets() { | |
| // 1. Setup: create a gun with 1 bullet | |
| let gun = Gun(bullets: 1) | |
| // 2. Execution: shoot | |
| gun.shoot() |
| import Foundation | |
| class Gun: NSObject { | |
| var bullets = 0 | |
| init(bullets: Int) { | |
| self.bullets = bullets | |
| } |
| import XCTest | |
| class MyNativeTests: XCTestCase { | |
| func testSomething() { | |
| } | |
| } |
| import XCTest | |
| class MyNativeTests: XCTestCase { | |
| override func setUp() { | |
| super.setUp() | |
| // Put setup code here. This method is called before the invocation of each test method in the class. | |
| } | |
| override func tearDown() { |
| platform :ios, '9.0' | |
| target 'MyAwesomeProject' do | |
| target 'MyAwesomeProjectTests' do | |
| inherit! :search_paths | |
| pod 'Specta' | |
| pod 'Expecta' | |
| end | |
| end |