2011-12-16 01:05:15 +01:00
|
|
|
Feature: Middleman CLI
|
|
|
|
|
|
|
|
Scenario: Create a new project
|
2011-12-23 19:58:56 +01:00
|
|
|
Given I run `middleman init MY_PROJECT`
|
|
|
|
Then the exit status should be 0
|
2011-12-16 07:11:59 +01:00
|
|
|
When I cd to "MY_PROJECT"
|
|
|
|
Then the following files should exist:
|
2012-03-25 05:37:03 +02:00
|
|
|
| Gemfile |
|
2012-05-05 06:11:11 +02:00
|
|
|
| .gitignore |
|
2011-12-16 07:11:59 +01:00
|
|
|
| config.rb |
|
2011-12-23 19:58:56 +01:00
|
|
|
| source/index.html.erb |
|
|
|
|
| source/images/background.png |
|
|
|
|
| source/images/middleman.png |
|
|
|
|
| source/layouts/layout.erb |
|
|
|
|
| source/javascripts/all.js |
|
2012-01-02 23:48:47 +01:00
|
|
|
| source/stylesheets/all.css |
|
|
|
|
| source/stylesheets/normalize.css |
|
2011-12-21 21:13:28 +01:00
|
|
|
|
|
|
|
Scenario: Create a new project (alias i)
|
|
|
|
When I run `middleman i MY_PROJECT`
|
|
|
|
Then a directory named "MY_PROJECT" should exist
|
|
|
|
|
2012-03-25 05:37:03 +02:00
|
|
|
Scenario: Create a new project (alias new)
|
2011-12-21 21:13:28 +01:00
|
|
|
When I run `middleman new MY_PROJECT`
|
|
|
|
Then a directory named "MY_PROJECT" should exist
|
|
|
|
|
2012-03-25 05:37:03 +02:00
|
|
|
Scenario: Create a new project (alias n)
|
2011-12-21 21:13:28 +01:00
|
|
|
When I run `middleman n MY_PROJECT`
|
|
|
|
Then a directory named "MY_PROJECT" should exist
|
2011-12-16 07:11:59 +01:00
|
|
|
|
|
|
|
Scenario: Create a new project with Rack
|
|
|
|
When I run `middleman init MY_PROJECT --rack`
|
|
|
|
Then a directory named "MY_PROJECT" should exist
|
|
|
|
When I cd to "MY_PROJECT"
|
|
|
|
Then the following files should exist:
|
|
|
|
| config.rb |
|
|
|
|
| config.ru |
|
|
|
|
| Gemfile |
|
|
|
|
|
2012-03-25 05:37:03 +02:00
|
|
|
Scenario: Create a new project without Bundler
|
|
|
|
When I run `middleman init MY_PROJECT --no-bundler`
|
2011-12-16 07:11:59 +01:00
|
|
|
Then a directory named "MY_PROJECT" should exist
|
|
|
|
When I cd to "MY_PROJECT"
|
|
|
|
Then the following files should exist:
|
|
|
|
| config.rb |
|
|
|
|
Then the following files should not exist:
|
2012-03-25 05:37:03 +02:00
|
|
|
| Gemfile |
|
2011-12-16 07:11:59 +01:00
|
|
|
| config.ru |
|
|
|
|
|
|
|
|
Scenario: Create a new HTML5 project
|
|
|
|
When I run `middleman init MY_PROJECT --template=html5`
|
|
|
|
Then a directory named "MY_PROJECT" should exist
|
|
|
|
When I cd to "MY_PROJECT"
|
|
|
|
Then the following files should exist:
|
|
|
|
| config.rb |
|
2012-03-25 05:37:03 +02:00
|
|
|
| Gemfile |
|
2011-12-16 07:11:59 +01:00
|
|
|
Then the following files should not exist:
|
|
|
|
| config.ru |
|
2012-03-04 01:40:03 +01:00
|
|
|
And the file "config.rb" should contain "set :js_dir, 'js'"
|
2011-12-16 07:11:59 +01:00
|
|
|
Then a directory named "source" should exist
|
|
|
|
When I cd to "source"
|
|
|
|
Then the following files should exist:
|
|
|
|
| index.html |
|
|
|
|
| humans.txt |
|
|
|
|
| js/script.js |
|
|
|
|
|
|
|
|
Scenario: Create a new HTML5 project with Rack
|
|
|
|
When I run `middleman init MY_PROJECT --rack --template=html5`
|
|
|
|
Then a directory named "MY_PROJECT" should exist
|
|
|
|
When I cd to "MY_PROJECT"
|
|
|
|
Then the following files should exist:
|
|
|
|
| config.rb |
|
|
|
|
| config.ru |
|
|
|
|
| Gemfile |
|
|
|
|
|
|
|
|
Scenario: Create a new Mobile HTML5 project
|
|
|
|
When I run `middleman init MY_PROJECT --template=mobile`
|
|
|
|
Then a directory named "MY_PROJECT" should exist
|
|
|
|
When I cd to "MY_PROJECT"
|
|
|
|
Then the following files should exist:
|
|
|
|
| config.rb |
|
2012-03-25 05:37:03 +02:00
|
|
|
| Gemfile |
|
2011-12-16 07:11:59 +01:00
|
|
|
Then the following files should not exist:
|
|
|
|
| config.ru |
|
|
|
|
Then a directory named "source" should exist
|
|
|
|
When I cd to "source"
|
|
|
|
Then the following files should exist:
|
|
|
|
| index.html |
|
|
|
|
| humans.txt |
|
|
|
|
| js/libs/respond.min.js |
|
|
|
|
|
|
|
|
Scenario: Create a new Mobile HTML5 project with Rack
|
|
|
|
When I run `middleman init MY_PROJECT --rack --template=mobile`
|
|
|
|
Then a directory named "MY_PROJECT" should exist
|
|
|
|
When I cd to "MY_PROJECT"
|
|
|
|
Then the following files should exist:
|
|
|
|
| config.rb |
|
|
|
|
| config.ru |
|
|
|
|
| Gemfile |
|