You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

calculatrice_steps.rb 602 B

2 years ago
123456789101112131415161718192021222324252627
  1. Soit(/^une calculatrice$/) do
  2. @calc = Calculatrice.new
  3. end
  4. Etantdonnéqu('on tape {int}') do |entier|
  5. @calc.push entier
  6. end
  7. Soit("j'entre {int} pour le premier/second nombre") do |entier|
  8. @calc.push entier
  9. end
  10. Soit('je tape sur la touche {string}') do |_touche|
  11. @result = @calc.additionner
  12. end
  13. Lorsqu(/on tape additionner/) do
  14. @result = @calc.additionner
  15. end
  16. Alors('le résultat affiché doit être {float}') do |resultat_attendu|
  17. expect(@result).to eq(resultat_attendu)
  18. end
  19. Alors('le résultat doit être {float}') do |resultat_attendu|
  20. expect(@result).to eq(resultat_attendu)
  21. end

No Description

Contributors (1)