2015-02-12 69 views
0

我正在與Vim和Behat合作。當我添加新的方案,或當場景中發生故障時,我裏面的vim如何用Vim和Behat節省我的時間,用快捷方式?

:!bin/behat %:42 

當我有一個功能的場景裏面光標鍵入此命令,可以創建一個快捷方式,以貝哈特正好運行此場景?

42  Scenario: run behat scenario with shortcut 
43   Given my cursor is on a scenario 
44   Then I can run behat just for this one 
45   And save my time 
+0

你的意思是你只是想運行'場景:在功能中運行快捷方式的behat場景? – BentCoder 2015-02-12 09:28:09

+0

是的,...我想運行那個場景 – sensorario 2015-02-12 13:00:35

回答

0

當我使用symfony的我能做到這一點,如:

bin/behat --profile=your_profile_name YourFeatureFileName.feature:42 

所以只有它是第42組的運行情況。

+0

而且,... Vim快捷方式在哪裏調用這個命令? – sensorario 2015-02-12 14:29:46

+1

你可能對[this]感興趣(http://knplabs.com/en/blog/vim-behat)和[this](https://github.com/tpope/vim-cucumber) – BentCoder 2015-02-12 14:43:39

+0

我只想提醒你「:!bin/behat%:42:與你的」bin/behat --profile = your_profile_name YourFeatureFileName.feature:42「相同 – sensorario 2015-02-13 08:26:02