Skip to content

Instantly share code, notes, and snippets.

@CSOscarTanner
Last active January 20, 2017 16:47
Show Gist options
  • Select an option

  • Save CSOscarTanner/95669dff666e0efc0afa to your computer and use it in GitHub Desktop.

Select an option

Save CSOscarTanner/95669dff666e0efc0afa to your computer and use it in GitHub Desktop.
All you need to install in your machine to use Specification By Example in Android and iOS using Calabash

Getting Started

Ruby

There are a lot of ways of installing ruby, one way is using Rbenv (https://github.com/sstephenson/rbenv). Its also available in Homebrew for Mac users.

Another way is using RVM (http://rvm.io/rvm/install):

Install RVM stable with ruby:

$ \curl -sSL https://get.rvm.io | bash -s stable --ruby

After this, include the following lines in you ~/.bash_profile file.

export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s $HOME/.rvm/scripts/rvm ]] && source $HOME/.rvm/scripts/rvm

Android SDK

You should install at least the Android SDK installed (https://developer.android.com/sdk/index.html). If you prefer you can install the Android Studio bundle.

After installing the SDK, include the following lines in your ~/.bash_profile file:

export ANDROID_HOME=Path_to_Android_SDK
export PATH=$PATH:$ANDROID_HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/lib:$ANDROID_HOME/tools/lib

Restart your terminal so the new variables can be exported and type android sdk to open Android SDK Manager and install all Android SDK tools and all API versions from 15 to the last one.

iOS

Install Xcode using the Apple App Store. SDK 8.2 or above.

Calabash

If you will run Calabash only for Android, run the following command in your terminal:

gem install calabash-android calabash-common cs-bdd

If you will run only for iOS, use:

gem install calabash-cucumber calabash-common cs-bdd

For both Android and iOS, use:

gem install calabash-android calabash-cucumber calabash-common cs-bdd

iOS Deploy

To allow Calabash iOS to install the app in devices, please install ios-deploy

Text Editor

You can use any text editor that you like. I suggest Emacs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment