This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Design and the fly likes Using Given/When/Then with Kiwi? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Design
Bookmark "Using Given/When/Then with Kiwi?" Watch "Using Given/When/Then with Kiwi?" New topic
Author

Using Given/When/Then with Kiwi?

Nic Grange
Greenhorn

Joined: Sep 04, 2013
Posts: 5
After getting comfortable with Given/When/Then style with Spock, trying out Kiwi for iOS and having to use RSpec style seems to be taking a step backwards (similar to using XCode :-) ).
I see that RSpec has an extension for Given/When/Then but i couldn't see anything for Kiwi.
Any advice on this or how best to keep specifications consistent in ported application?
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
Nic,
No answers for you, just thanks for introducing me to a BDD framework I'd never heard of. Almost make me want to try Objective C again...

Thanks!
Burk


SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
John Smart
Author
Ranch Hand

Joined: Aug 06, 2013
Posts: 33
    
    5
I agree: Kiwi is based on RSpec - I get the same impression when using Jasmine. It seems pretty baked-in to Kiwi, though.
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
Nic Grange wrote:Any advice on this or how best to keep specifications consistent in ported application?

Nic,
I haven't done much porting, but from my experience, it depends on what type of porting you're doing. If you're staying on the same platform but moving to a new language then the Given-When-Thens should stay the same because you expect the behavior to be consistent. But, if you're moving from one OS to another, then (at the UI/UX level at least) you may need to reconsider how the application should behave.

I hope that helps some,
Burk
Nic Grange
Greenhorn

Joined: Sep 04, 2013
Posts: 5
Thanks for the responses.

Burk,
In this case, the ported application needs to behave exactly the same on different OS's so I was hoping that the specification could look almost the same across the different languages/frameworks even if the code doesn't. Seems easy with Java and C# but Objective-C/iOS always has to be difficult.
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
Ouch. I haven't touched Objective C in a few years, but I'd think you could at least have the same the test names/descriptions - that should help some.

Good luck,
Burk
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Using Given/When/Then with Kiwi?
 
Similar Threads
What kinds of applications do you built using Ruby?
Cucumber with Rspec
Favourite fruits you eat and why?
BDD in Action: Using Concordion
CSS template