Saturday July 07, 2012

View Controller Functional Testing in RubyMotion

If you need to blow your mind, then check out Eloy Duran’s great demo video of the new functional testing feature in RubyMotion. Using the built in MacBacon spec runner right along side your other tests, you can specify tests that exercise each of your view controller objects. When run, a copy of your view controller is instantiated and its view is displayed in the simulator. You drive the view through events and gestures and assert that the resulting UI is what you exepect. Eloy tapped into the UI Automation mechanism under the hood to get this thing to work. It’s pretty slick and another great reason to experiment with RubyMotion.