テーブルにスペースを渡す方法は?
Background:
Given the following books
|Author |(here several spaces)Title(here several spaces)|
テーブルにスペースを渡す方法は?
Background:
Given the following books
|Author |(here several spaces)Title(here several spaces)|
私はこれを行います:
Given the following books
| Author | Title |
| "J. K. Rowling" | "Harry P " |
| " Isaac Asimov " | "Robots and Empire" |
次に、スペースを保持しながら、引用符が存在する場合はそれを削除するようにバインディングを作成できます。
これは、後でスペースを追加するというアイデアよりもはるかに好ましいと思います。これは、人間があまり読めないためです。引用符を使用すると、スペースを読んでいる人間(利害関係者/コーダー)にスペースが見えるようになります。
ステップを追加することで回避できます。何かのようなもの:
Given the following books
|Author | Title |
Add append <5> spaces to book title
編集:
完全な機能は次のようになります。
Scenario: Adding books with spaces in the title
Given the following book
| price | title |
And <5> spaces appended to a title
When book is saved
Then the title should be equals to <title without spaces>
私はちょうど同じ状況に直面しました、私の解決策はこれでした、次のようにステップにスペースを追加しました:
Scenario: Adding books with spaces in the title
Given the following book ' <title> '
When book is saved
Then the title should be equals to '<title>'
| price | title |
| 50.00 | Working hard |