From 55e3c932787e8f5ffcf72d2f5b8e0e8ab6ef65b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20G=C3=BCnnewig?= Date: Tue, 9 Sep 2014 09:07:18 +0200 Subject: [PATCH] Feature tests for force-option --- middleman-core/features/cli_init.feature | 51 ++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/middleman-core/features/cli_init.feature b/middleman-core/features/cli_init.feature index d6d5b4b4..1bde5a54 100644 --- a/middleman-core/features/cli_init.feature +++ b/middleman-core/features/cli_init.feature @@ -98,3 +98,54 @@ Feature: Middleman CLI | config.rb | | config.ru | | Gemfile | + + Scenario: Enforce creation of Mobile HTML5 project + When I run `middleman init MY_PROJECT --template=mobile` + When I run `middleman init MY_PROJECT --template=mobile --force` + Then a directory named "MY_PROJECT" should exist + And the output should contain: + """ + identical + """ + And the output should contain: + """ + exist + """ + Scenario: Enforce creation of HTML5 project + When I run `middleman init MY_PROJECT --template=html5` + When I run `middleman init MY_PROJECT --template=html5 --force` + Then a directory named "MY_PROJECT" should exist + And the output should contain: + """ + identical + """ + And the output should contain: + """ + exist + """ + + Scenario: Enforce creation of default project + When I run `middleman init MY_PROJECT --template=default` + When I run `middleman init MY_PROJECT --template=default --force` + Then a directory named "MY_PROJECT" should exist + And the output should contain: + """ + identical + """ + And the output should contain: + """ + exist + """ + + Scenario: Enforce creation of empty project + When I run `middleman init MY_PROJECT --template=empty` + When I run `middleman init MY_PROJECT --template=empty --force` + Then a directory named "MY_PROJECT" should exist + And the output should contain: + """ + identical + """ + And the output should contain: + """ + exist + """