a UNIX user I need to be able to list the current directory's contents Scenario: List 2 files in a directory Given I am in a directory "test" And I have a file named "foo" And I have a file named "bar" When I run "ls" Then I should get: """ bar foo """ 12年11月3⽇日星期六
a UNIX user I need to be able to list the current directory's contents Scenario: List 2 files in a directory Given I am in a directory "test" And I have a file named "foo" And I have a file named "bar" When I run "ls" Then I should get: """ bar foo """ 12年11月3⽇日星期六
entered 3 into the calculator And I have entered 2 into the calculator When I press divide Then the result should be 1.5 on the screen # language: de Szenario: Normale Zahlen Gegeben sei ich habe 3 in den Taschenrechner eingegeben Und ich habe 2 in den Taschenrechner eingegeben Wenn ich divide drücke Dann sollte das Ergebniss auf dem Bildschirm 1.5 sein # language: zh-TW 場景: 將兩個數相除 假設我已經在計算機上輸⼊入 3 ⽽而且我已經在計算機上輸⼊入 2 當我按下 divide 那麼螢幕上應該顯⽰示 1.5 # language: ja シナリオ: ふつうの数値 前提 3 を⼊入⼒力 かつ 2 を⼊入⼒力 もし divide を押した ならば 1.5 を表⽰示 12年11月3⽇日星期六
directory structure 3 As a UNIX user 4 I need to be able to list the current directory's contents 5 6 Scenario: List 2 files in a directory 7 Given I am in a directory "test" 8 And I have a file named "foo" 9 And I have a file named "bar" 10 When I run "ls" 11 Then I should get: 12 """ 13 bar 14 foo 15 """ 12年11月3⽇日星期六
a UNIX user I need to be able to list the current directory's contents Scenario: List 2 files in a directory # features/ls.feature:6 Given I am in a directory "test" And I have a file named "foo" And I have a file named "bar" When I run "ls" Then I should get: """ bar foo """ 1 scenario (1 undefined) 5 steps (5 undefined) 0m0.019s 12年11月3⽇日星期六
snippets: /** * @Given /^I am in a directory "([^"]*)"$/ */ public function iAmInADirectory($arg1) { throw new PendingException(); } /** * @Then /^I should get:$/ */ public function iShouldGet(PyStringNode $string) { throw new PendingException(); } 12年11月3⽇日星期六
a UNIX user I need to be able to list the current directory's contents Scenario: List 2 files in a directory # features/ls.feature:6 Given I am in a directory "test" # FeatureContext::iAmInADirectory() TODO: write pending definition And I have a file named "foo" # FeatureContext::iHaveAFileNamed() And I have a file named "bar" # FeatureContext::iHaveAFileNamed() When I run "ls" # FeatureContext::iRun() Then I should get: # FeatureContext::iShouldGet() """ bar foo """ 1 scenario (1 pending) 5 steps (4 skipped, 1 pending) 0m0.018s 12年11月3⽇日星期六
structure As a UNIX user I need to be able to list the current directory's contents Scenario: List 2 files in a directory Given I am in a directory "test" And I have a file named "foo" And I have a file named "bar" When I run "ls" Then I should get: """ bar foo """ 1 scenario (1 passed) 5 steps (5 passed) 0m0.03s 12年11月3⽇日星期六
- A DB mockup / fixture creation • Symfony2 - Integration for Symfony • Behatch - provides most common context http://extensions.behat.org/ 12年11月3⽇日星期六