我是Ruby和BDD的新手。我试图用黄瓜来解决Bank OCR Kata问题,但我在第一步就被卡住了。因为Kata使用"|“和多行字符串作为输入。如何将此输入提供给方案大纲。我正在尝试构建一个功能,比如
Scenario Outline: submit account number
   Given the scanner is ready
   When  the account number is "<account>"
   Then the response should be "<response>"
Scenarios: read account
   |account| response |   发布于 2013-12-22 06:59:33
您可以使用%q()对多行进行报价。
my_lines = %q(This text
spans multiple
lines)这将允许您编写类似于
%q(  _  _     _  _  _  _  _
  | _| _||_||_ |_   ||_||_|
  ||_  _|  | _||_|  ||_| _| )我相信它和123456789是一样的
便笺
在实际输入时,我的间距可能会关闭。
https://stackoverflow.com/questions/20723582
复制相似问题