I hereby claim:
- I am jmnavarro on github.
- I am jmnavarro (https://keybase.io/jmnavarro) on keybase.
- I have a public key whose fingerprint is 72FB 7F2A 24BD EEC9 0BCD 5C6A 3399 DBAA D1E2 E912
To claim this, I am signing this object:
| func given(givenText: String, givenCode: ()->(), | |
| when whenText: String, whenCode: ()->(), | |
| then thenText: String, thenCode: ()->()) { | |
| println("\n\n=> SCENARIO\n\tGiven '\(givenText)'\n\tWhen '\(whenText)'\n\tThen '\(thenText)'") | |
| givenCode() | |
| whenCode() | |
| thenCode() | |
| } |
I hereby claim:
To claim this, I am signing this object:
| // | |
| // returns the list of different extensions from a bunch of files | |
| // | |
| func differentExtensions(fileNames: [String]) { | |
| // Step 1. Map: process file names list to convert to extensions list | |
| let allExtensions = fileNames.map { $0.pathExtension.lowercaseString } | |
| // Step 2. Reduce: iterate removing duplicates | |
| return allExtensions.reduce([String]()) { (acum, value) -> [String] in |
| extension Bool : StringLiteralConvertible { | |
| static public func convertFromStringLiteral(value: StringLiteralType) -> Bool { | |
| return (value.lowercaseString == "false") ? false : true | |
| } | |
| static public func convertFromExtendedGraphemeClusterLiteral(value: StringLiteralType) -> Bool { | |
| return convertFromStringLiteral(value) | |
| } |
| func XCTAssertOptional(expression: @autoclosure () -> AnyObject?, _ message: String? = nil) { | |
| let evaluatedExpression:AnyObject? = expression() | |
| if evaluatedExpression == nil { | |
| if let messageValue = message { | |
| XCTFail(messageValue) | |
| } | |
| else { | |
| XCTFail("Optional asertion failed: \(evaluatedExpression)") | |
| } |
| cd ./Images | |
| for f in *.png; do | |
| fn=`echo "$f" | cut -d'.' -f1` | |
| if ! grep -q @2x <<< $fn; then | |
| if ! $(grep -i -r --include=*.m --include=*.xib "`echo "$f" | cut -d'.' -f1`" ../Classes/ > /dev/null); then | |
| echo $f | |
| fi | |
| fi | |
| done |
| // | |
| // NSProcessInfo+DetectTestEnvironment.h | |
| // Memoir | |
| // | |
| // Created by JM - http://jmnavarro.github.com | |
| // | |
| #import <Foundation/Foundation.h> | |
| @interface NSProcessInfo (DetectTestEnvironment) |