Giter Site home page Giter Site logo

dojo-bdd-cucumber's Introduction

dojo-bdd-cucumber

Dojo realizado no GUTS-RS no dia 2014-05-26

Instruções

  • Instale ruby na sua máquina (rvm)
  • Clone o repositório: git clone https://github.com/dwayhs/dojo-bdd-cucumber.git
  • Acesse a pasta do repositório: cd dojo-bdd-cucumber
  • Instale as dependências do projeto bundle install
  • Pronto!

Executar a calculadora

ruby calc.rb 1+1
ruby calc.rb 1+1,2+2
ruby calc.rb 1*1,2/2

Executar os testes

$ cucumber

Você deverá ver o seguinte output na tela

Feature: Executa uma operação

  Scenario Outline: Adiciona dois numeros # features/adicao.feature:3
    Given a entrada "<input>"             # features/step_definitions/steps.rb:1
    When a calculadora e executada        # features/step_definitions/steps.rb:5
    Then a saida e "<output>"             # features/step_definitions/steps.rb:10

    Examples:
      | input | output |
      | 2+2   | 4      |
      | 98+1  | 99     |
      | 98+2  | 100    |
      | 2/0   | !!!    |

Feature: Executa multiplas operaçoes

  Scenario Outline: Adiciona varios numeros separados por virgula # features/multiplasContas.feature:3
    Given a entrada "<input>"                                     # features/step_definitions/steps.rb:1
    When a calculadora e executada                                # features/step_definitions/steps.rb:5
    Then a saida e "<output>"                                     # features/step_definitions/steps.rb:10

    Examples:
      | input          | output  |
      | 2+2,3+3,4+4    | 4,6,8   |
      | 98+1,10/5,33-1 | 99,2,32 |

6 scenarios (6 passed)
18 steps (18 passed)
0m0.280s

dojo-bdd-cucumber's People

Contributors

dwayhs avatar

Watchers

 avatar

Forkers

guts-rs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.