How to get Calabash working on macOS Sierra

February 15, 2017

In our company, Handcrafted Mobile (https://handcraftedmobile.com) we are using Calabash (http://calaba.sh/) for automated UI testing on iOS. However, setting it up on different environments could be a bit tricky

If you had any problems with installing Calabash on macOS Sierra, or maybe you ran into issues with conflicting gem versions, please follow the instructions to have this testing framework set up easily.

This tutorial is based on:

Install rbenv from Homebrew

$ brew update
$ brew install rbenv

Install Ruby version 2.2.0 from rbenv

$ rbenv install 2.2.0

Set global ruby version to 2.2.0

$ rbenv global 2.2.0

Check if correct ruby version has been set

$ ruby -v

If version wasn’t set correctly :

First step - edit you .bash_profile and add this lines:

export PATH="$HOME/.rbenv/bin:$PATH" 
eval "$(rbenv init -)"

Second step - execute this command to replace your current shell:

exec $SHELL -l

Install bundler:

$ gem install bundler

Follow one of three tutorials that demonstrate how to integrate Calabash into your Xcode:

https://github.com/calabash/calabash-ios/wiki/Tutorial%3A-How-to-add-Calabash-to-Xcode

Install cucumber if it wasn’t installed before

$ gem install cucumber

Now you can run test :

$ cucumber

Posted by: Piotr Sękara, https://github.com/piotr-sekara