From ceb4769325d6692cc53abfd8f33c8b2516bbbb1c Mon Sep 17 00:00:00 2001 From: yterajima Date: Wed, 18 Feb 2015 20:43:15 +0900 Subject: [PATCH] Add test to `$ middleman init` using tmeplate * using Middleman directory * using github * user/repository * user/repository#branch * using full path * contains "://" --- middleman-core/features/cli_init.feature | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/middleman-core/features/cli_init.feature b/middleman-core/features/cli_init.feature index e04e92ac..1eb9e840 100644 --- a/middleman-core/features/cli_init.feature +++ b/middleman-core/features/cli_init.feature @@ -55,3 +55,35 @@ Feature: Middleman CLI And I type "y" And I type "y" Then a directory named "MY_PROJECT" should exist + + Scenario: Create a new project using Middleman directory + When I run `middleman init MY_PROJECT -T amicus` + Then a directory named "MY_PROJECT" should exist + When I cd to "MY_PROJECT" + And the file "README.md" should contain "Amicus" + And the file ".gitignore" should not exist + + Scenario: Create a new project using github(user/repository) + When I run `middleman init MY_PROJECT -T middleman/middleman-templates-default` interactively + And I type "y" + And I type "y" + And I type "y" + And I type "y" + Then a directory named "MY_PROJECT" should exist + + Scenario: Create a new project using github(user/repository#branch) + When I run `middleman init MY_PROJECT -T middleman/middleman-templates-default#master` interactively + And I type "y" + And I type "y" + And I type "y" + And I type "y" + Then a directory named "MY_PROJECT" should exist + And the output should contain "-b master" + + Scenario: Create a new project using full path(://) + When I run `middleman init MY_PROJECT -T https://github.com/middleman/middleman-templates-default.git` interactively + And I type "y" + And I type "y" + And I type "y" + And I type "y" + Then a directory named "MY_PROJECT" should exist