Skip to content

Commit

Permalink
Change Kiwi Xcode file template to use the name of the class you are …
Browse files Browse the repository at this point in the history
…testing to generate the default file name and extra code inside of the generated spec.
  • Loading branch information
Cory Roloff committed Oct 12, 2013
1 parent 74e1b14 commit c261f1f
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
27 changes: 27 additions & 0 deletions Xcode Templates/Kiwi Spec.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,33 @@
<string>___FILEBASENAME___.m</string>
<key>SortOrder</key>
<integer>1</integer>
<key>Options</key>
<array>
<dict>
<key>Default</key>
<string></string>
<key>Description</key>
<string>What would you like to test?</string>
<key>Identifier</key>
<string>testedClass</string>
<key>Name</key>
<string>Spec for</string>
<key>Required</key>
<true/>
<key>NotPersisted</key>
<true/>
<key>Type</key>
<string>text</string>
</dict>
<dict>
<key>Default</key>
<string>___VARIABLE_testedClass:identifier___Spec</string>
<key>Identifier</key>
<string>productName</string>
<key>Type</key>
<string>static</string>
</dict>
</array>
<key>Summary</key>
<string>Spec class of Kiwi BDD framework</string>
</dict>
Expand Down
8 changes: 7 additions & 1 deletion Xcode Templates/Kiwi Spec.xctemplate/___FILEBASENAME___.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

#import <Kiwi/Kiwi.h>

#import "___VARIABLE_testedClass:identifier___.h"

SPEC_BEGIN(___FILEBASENAMEASIDENTIFIER___)

SPEC_END
describe(@"___VARIABLE_testedClass:identifier___", ^{

});

SPEC_END

0 comments on commit c261f1f

Please sign in to comment.