This file contains hidden or 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 TestModule | |
class ModuleTests: QuickSpec { | |
var sut: TestClass? | |
describe("The TestClass") { | |
context("in a specific state") { | |
it("does what ever we test for") { | |
// the actual test |
This file contains hidden or 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
protocol UserDefaultsProtocol { | |
func object(forKey defaultName: String) -> Any? | |
} | |
extension UserDefaults: UserDefaultsProtocol {} | |
class Demo { | |
var userDefaults: UserDefaultsProtocol = UserDefaults.standard | |
} |
This file contains hidden or 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
#!/bin/bash | |
# =========== Install brew ========== | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
# ========= Install Apps ========== | |
brew tap Homebrew/bundle | |
brew bundle |
This file contains hidden or 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
cask_args appdir: "/Applications" | |
tap "caskroom/cask" | |
brew "mas" | |
brew "openssl" | |
tap "sublime" | |
tap "chrome" | |
tap "sourcetree" | |
mas "Xcode", id: 497799835 |
This file contains hidden or 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 <kiwi.h> | |
#import <SomeClass.h> | |
SPEC_BEGIN(SomeClass) | |
describe(@"The SomeClass", ^{ | |
__block Someclass *sut; | |
beforeAll(^{ | |
//Nothing to do here | |
}); |
This file contains hidden or 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
+ (void)load { | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
NSError *error; | |
BOOL result = [[self class] jr_swizzleMethod:@selector(text) withMethod:@selector(swizzleName) error:&error]; | |
if (!result || error) { | |
NSLog(@"Can't swizzle methods - %@", [error description]); | |
} | |
}); | |
} |
This file contains hidden or 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
#!/bin/bash | |
# | |
# Automatically adds branch name to every commit message. | |
# | |
value=`cat $1` | |
type="$( cut -d ':' -f 1 <<< "$value" )" | |
contains=$(echo ${typeList[@]} | grep -o type | wc -w) | |
if [ contains -eq 0 ]; then | |
return 1 | |
fi |
This file contains hidden or 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
#!/bin/bash | |
LINT=$(which swiftlint) | |
if [[ -e "${LINT}" ]]; then | |
echo "SwiftLint Start..." | |
else | |
echo "SwiftLint does not exist, download from https://github.com/realm/SwiftLint" | |
exit 1 | |
fi | |
$LINT lint --quiet |
This file contains hidden or 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
# =========== Setup Git Hooks ========== | |
ln -s ./Hooks/prepare-commit-msg ../.git/hooks/prepare-commit-msg | |
ln -s ./Hooks/pre-commit ../.git/hooks/pre-commit | |
chmod +x ./Hooks/* |
This file contains hidden or 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
fastlane_version "2.49.0" | |
default_platform :ios | |
platform :ios do | |
before_all do | |
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..." | |
end |
OlderNewer