Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
RubyMotion iOS Development Essentials

You're reading from  RubyMotion iOS Development Essentials

Product type Book
Published in Jul 2013
Publisher Packt
ISBN-13 9781849695220
Pages 262 pages
Edition 1st Edition
Languages

Table of Contents (19) Chapters

RubyMotion iOS Development Essentials
Credits
About the Authors
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Getting Ready for RubyMotion 2. Instant Gratification – Your First Application 3. Evolution – From Objective-C to RubyMotion 4. Mastering MVC Paradigm 5. User Interface – Cosmetics for Your App 6. Device Capability – Power Unleashed 7. Interface Builder and WebView – More Goodies! 8. Testing – Let's Fail Gracefully 9. Creating a Game 10. Getting Ready for the App Store 11. Extending RubyMotion Index

Unit testing


The goal of unit testing is to isolate each part of the program and show that the individual parts function properly. RubyMotion uses MacBacon, which is an iOS flavor of Bacon.

Note

Bacon is a smaller clone of RSpec. With less than 350 LOCs, we nevertheless get all the essential features.

Here, we will also follow Test Driven Development (TDD), a way of working where unit tests are created before the code itself is written. Of course, the tests will fail initially because we don't have anything. That's the philosophy of TDD; first we write the test case, it fails, we then refractor our code and once again write the feature code, and this time our test cases pass and the code is considered complete.

The idea here is that the developer himself wears the hat of a tester. We first document the feature in the form of a test, which fails, then we write our code and refractor, and once again document with a test case for the next feature.

First, let's create an application, which we will...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}