Skip to content

Instantly share code, notes, and snippets.

View hoang-tran's full-sized avatar

Hoang Tran hoang-tran

View GitHub Profile
@hoang-tran
hoang-tran / Xcode.gitignore
Last active November 20, 2016 02:04
Xcode gitignore
# OS X
.DS_Store
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
func testCreateNewNote() {
visitNotesScreen()
clickOn("Create new note")
fillInNewNoteForm()
clickOn("Create")
expectToSeeNewNoteCreatedSuccessfully()
}
# command 1: go to your project directory
# for example:
# cd ~/Documents/MyAwesomeProject
cd path/to/project
# command 2: create an empty file named .gitignore
touch .gitignore
# command 3: open the .gitignore file with your default text editor (usually TextEdit)
open .gitignore
# command 1: initialize git
git init
# command 2: add all files to git staging
git add .
# command 3: create your first commit with message "create project"
git commit -m "creat project"
import Quick
import Nimble
class MyFirstSpec : QuickSpec {
override func spec() {
super.spec()
describe("first test") {
it("should pass") {
expect(1).to(equal(1))
#import <Specta/Specta.h>
#import <Expecta/Expecta.h>
SpecBegin(MyFirstSpec)
describe(@"first test", ^{
it(@"should pass", ^{
expect(1).to.equal(1);
});
});
#import "HomeTests.h"
@implementation HomeTests
#pragma mark - tests
// test method name MUST have the prefix `test`
// for example: testA, testB, testLogin, ect...
- (void)testHomeScreen {
[self visitHomeScreen];
#import <KIF/KIF.h>
@interface HomeTests : KIFTestCase
@end
import KIF
extension XCTestCase {
func tester(file : String = #file, _ line : Int = #line) -> KIFUITestActor {
return KIFUITestActor(inFile: file, atLine: line, delegate: self)
}
func system(file : String = #file, _ line : Int = #line) -> KIFSystemTestActor {
return KIFSystemTestActor(inFile: file, atLine: line, delegate: self)
}