Calabash android 搭建本地环境
安装rbenv
How to install Homebrew
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
Installing rbenv and ruby-build
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
修改~/.bash_profile
if which rbenv > /dev/null;
then eval "$(rbenv init -)";
fi export PATH="$HOME/.rbenv/bin:$PATH"Updating Ruby and setting that to be the default
查看所有ruby版本:$ rbenv install –l
查看最新版本:
egrep"\s+2\.1\.\d+ ” <(rbenv install -l) | tail -1
安装最新版本:
$ rbenv install 2.1.8
设置默认版本:
$ rbenv local 2.1.8
验证是否安装成功:
$ rbenv version
ps:更详细链接:http://www.dreamxu.com/install-ruby-on-mac-with-rbenv/
安装Bundler
$ gem install bundler
验证是否安装成功
$ bundler -v
在工程目录下使用Bundler
$ bundler init
生成GemFile文件
Installing the Calabash gems
编辑GemFile文件
source ‘https://rubygems.org’
gem ‘calabash-cucumber’, ‘0.16.3’
gem ‘calabash-android’, ‘0.5.14’
gem ‘xamarin-test-cloud’, ‘1.1.2’
安装
bundle install
查看是否安装成功
$ calabash-ios version
0.16.4
$ calabash-android version
0.5.15
$ test-cloud version
1.1.2
至此,本地环境就搭建好了,接下来会写更多的用例。