Merge pull request #1456 from yterajima/feature/add-template-test

Add test to `$ middleman init` using tmeplate
This commit is contained in:
Thomas Reynolds 2015-02-23 12:30:11 -08:00
commit a3772428c1

View file

@ -55,3 +55,35 @@ Feature: Middleman CLI
And I type "y" And I type "y"
And I type "y" And I type "y"
Then a directory named "MY_PROJECT" should exist 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