RubyMotion Blog


This is the official blog of RubyMotion, a toolchain for iOS and OS X development that lets you do iPhone, iPad and Mac apps in Ruby.

Follow us on Twitter to stay tuned with everything that's happening in the community!

Not a RubyMotion user yet? Give it a spin today!

Functional View and Controller Testing with RubyMotion

RubyMotion now features a brand-new testing layer that lets you write functional specifications for the views and controllers of your application.

This layer is added on top of the existing testing framework and leverages the functionality of Apple’s UIAutomation framework. This video gives a quick overview to get you started:

Compared to the traditional usage of UIAutomation the experience here can be slightly different, as you get to write your tests in Ruby instead of Javascript, have access to the actual objects and you don’t need to use the Instruments application to run the test suite.

describe "The Timer view controller" do
  tests TimerController

  it "has a timer label" do
    view('Tap to start').should.not == nil

This feature was engineered by our friends at Fingertips and ships today in RubyMotion 1.15. You can learn more about the new APIs in the Testing RubyMotion Apps article in our developer center. The source code is also available in the HipByte/RubyMotion repository on GitHub.

Interested in giving RubyMotion a try? We offer a 30 days money back guarantee. Download it today!
Follow us on Twitter to stay tuned with everything that is happening in the community.

By Laurent Sansonetti.