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.

jruby-limitations.md 1.3 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Cucumber and JRuby limitations
  2. `cucumber` can be executed on `JRuby` (tested with `9.2`), although some of the features
  3. are not available on this platform.
  4. ## Defining steps with native languages
  5. There are currently three languages (Russian, Ukrainian and Uzbek) for which the step definition
  6. can not be written in native language.
  7. That means, for example, that you can not write the following code:
  8. ```ruby
  9. Допустим('я ввожу число {int}') do |число|
  10. calc.push число
  11. end
  12. ```
  13. Instead, you have to write:
  14. ```ruby
  15. Given('я ввожу число {int}') do |number|
  16. calc.push number
  17. end
  18. ```
  19. Of course, you can still write your feature files in a native language, for example, the following
  20. feature file can be executed on JRuby:
  21. ```gherkin
  22. # language: ru
  23. Функционал: Сложение чисел
  24. Чтобы не складывать в уме
  25. Все, у кого с этим туго
  26. Хотят автоматическое сложение целых чисел
  27. Сценарий: Сложение двух целых чисел
  28. Допустим я ввожу число 50
  29. И затем ввожу число 70
  30. Если я нажимаю "+"
  31. То результатом должно быть число 120
  32. ```

No Description

Contributors (1)