Find file
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (46 sloc) 2.5 KB


Allows RubyMotion projects to easily use Calabash iOS for automated acceptance testing.

For information about Calabash see:



$ (sudo) gem install motion-calabash


  1. Edit the Rakefile of your RubyMotion project and add the following require lines.

    require 'rubygems'
    require 'motion-calabash'

If you're using a Gemfile in your project (which you probably should), please also add `gem 'motion-calabash'` (possibly a version) to this file.


motion-calabash introduces a calabash Rake-task namespace to your project. The namespace currently contains three tasks: scaffold, run, console.

The scaffold target will generate the file structure and launch hooks needed to run calabash tests on your RubyMotion app.

$ krukow:~/github/rubymotion-inspect$ rake calabash:scaffold
  Run Scaffolding features
  Info Run rake calabash:run to try
  Copy launch file /Users/krukow/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/motion-calabash-0.9.137/scripts/launch.rb to features/support/launch.rb

$ krukow:~/github/rubymotion-inspect$ tree features
  ├── my_first.feature
  ├── step_definitions
  │   ├── calabash_steps.rb
  │   └── my_first_steps.rb
  └── support
      ├── env.rb
      ├── hooks.rb
      └── launch.rb

The run task can be used to run your suite of Calabash tests on your development build. You can run on simulator or on a USB connected device.

You can supply the following parameters target, device, os, args

$ rake calabash:run
$ rake calabash:run simulator
$ rake calabash:run device
$ rake calabash:run simulator target=5.1
$ rake calabash:run simulator target=6.0 device=ipad
$ rake calabash:run simulator args="features/my_first.feature --tags @a"

The console task gives you an interactive console where you can try out Calabash functions and explore your app. It is very useful when writing automated tests. See also: [Explore interactively!]( and [Ruby API](

$ rake calabash:console

(device and os params apply too).


Two sample projects