2011-12-15 19:05:15 -05:00
|
|
|
Feature: Middleman CLI
|
|
|
|
|
|
|
|
Scenario: Create a new project
|
2015-01-04 16:23:37 -05:00
|
|
|
When I run `middleman init MY_PROJECT` interactively
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
2011-12-23 13:58:56 -05:00
|
|
|
Then the exit status should be 0
|
2011-12-16 01:11:59 -05:00
|
|
|
When I cd to "MY_PROJECT"
|
|
|
|
Then the following files should exist:
|
2012-03-24 23:37:03 -04:00
|
|
|
| Gemfile |
|
2012-05-05 00:11:11 -04:00
|
|
|
| .gitignore |
|
2011-12-16 01:11:59 -05:00
|
|
|
| config.rb |
|
2011-12-23 13:58:56 -05:00
|
|
|
| source/index.html.erb |
|
|
|
|
| source/layouts/layout.erb |
|
|
|
|
| source/javascripts/all.js |
|
2015-01-04 16:06:14 -05:00
|
|
|
| source/stylesheets/site.css.scss |
|
|
|
|
| source/stylesheets/_normalize.scss |
|
2014-02-20 02:13:59 -05:00
|
|
|
|
|
|
|
Scenario: Create a new project in the current directory
|
|
|
|
Given a directory named "MY_PROJECT"
|
|
|
|
When I cd to "MY_PROJECT"
|
2015-01-04 16:28:13 -05:00
|
|
|
And I run `middleman init` interactively
|
2015-01-04 16:23:37 -05:00
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
2014-02-20 02:13:59 -05:00
|
|
|
Then the exit status should be 0
|
|
|
|
And the following files should exist:
|
|
|
|
| Gemfile |
|
|
|
|
| config.rb |
|
|
|
|
| source/index.html.erb |
|
|
|
|
|
2011-12-21 15:13:28 -05:00
|
|
|
Scenario: Create a new project (alias i)
|
2015-01-04 16:23:37 -05:00
|
|
|
When I run `middleman i MY_PROJECT` interactively
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
2011-12-21 15:13:28 -05:00
|
|
|
Then a directory named "MY_PROJECT" should exist
|
2014-02-20 02:13:59 -05:00
|
|
|
|
2012-03-24 23:37:03 -04:00
|
|
|
Scenario: Create a new project (alias new)
|
2015-01-04 16:23:37 -05:00
|
|
|
When I run `middleman new MY_PROJECT` interactively
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
2011-12-21 15:13:28 -05:00
|
|
|
Then a directory named "MY_PROJECT" should exist
|
2014-02-20 02:13:59 -05:00
|
|
|
|
2012-03-24 23:37:03 -04:00
|
|
|
Scenario: Create a new project (alias n)
|
2015-01-04 16:23:37 -05:00
|
|
|
When I run `middleman n MY_PROJECT` interactively
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
|
|
|
And I type "y"
|
2011-12-21 15:13:28 -05:00
|
|
|
Then a directory named "MY_PROJECT" should exist
|
2015-02-18 06:43:15 -05:00
|
|
|
|
|
|
|
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
|