/bravi-test-rest

Testing Books API (REST) with Cucumber and HttpParty in Ruby language

Primary LanguageRuby

bravi-test-rest

Testing Books API (REST) with Cucumber and HttpParty in Ruby language http://docs.ninjabooks.apiary.io/

Configurando o ambiente

Instalar rbenv

Execute os seguintes comandos:

$ git clone https://github.com/rbenv/rbenv.git ~/.rbenv

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ source ~/.bashrc

Inclua no ~/.bash_profile:

eval "$(rbenv init -)"

Listar as versões disponíveis:

rbenv install -l

Instalar uma versão:

rbenv install 2.4.2

Tornar a versão padrão para todos os projetos

$ rbenv global 2.4.2

Verficar a versão do Ruby instalada

$ ruby -v

Instalando o bundler

Navegar dentro do projeto e instalar o bundler

cd /bravi-test-rest
gem install bundler

Instalando as gems

Execute o seguinte comando dentro da raiz do projeto:

bundle install

Executando os testes

Execute o seguinte comando dentro da raiz do projeto:

cucumber features

Executando tags

Execute o seguinte comando dentro da raiz do projeto:

cucumber --tags @accounts @books @login