From 0692e71b63cfe8c80f62057f7cf5f97fc43a3ee8 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Thu, 15 Dec 2011 22:11:59 -0800 Subject: [PATCH] test built in template and flags --- .gitignore | 1 + features/cli.feature | 106 ++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 106 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9f6bba4c..06a67829 100755 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ fixtures/generator-test build doc .yardoc +tmp diff --git a/features/cli.feature b/features/cli.feature index 0d86d258..938849f4 100644 --- a/features/cli.feature +++ b/features/cli.feature @@ -2,4 +2,108 @@ Feature: Middleman CLI Scenario: Create a new project When I run `middleman init MY_PROJECT` - \ No newline at end of file + 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: + | config.ru | + | Gemfile | + Then a directory named "source" should exist + When I cd to "source" + Then the following files should exist: + | index.html.erb | + | layout.erb | + | stylesheets/site.css.scss | + + 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 | + Then the following files should not exist: + | Gemfile | + + Scenario: Create a new project with Bundler + When I run `middleman init MY_PROJECT --bundler` + Then a directory named "MY_PROJECT" should exist + When I cd to "MY_PROJECT" + Then the following files should exist: + | config.rb | + | Gemfile | + Then the following files should not exist: + | 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 | + Then the following files should not exist: + | config.ru | + | Gemfile | + 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 | + Then the following files should not exist: + | Gemfile | + + Scenario: Create a new HTML5 project with Bundler + When I run `middleman init MY_PROJECT --bundler --template=html5` + Then a directory named "MY_PROJECT" should exist + When I cd to "MY_PROJECT" + Then the following files should exist: + | config.rb | + | Gemfile | + Then the following files should not exist: + | config.ru | + + 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 | + Then the following files should not exist: + | config.ru | + | Gemfile | + 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 | + Then the following files should not exist: + | Gemfile | + + Scenario: Create a new Mobile HTML5 project with Bundler + When I run `middleman init MY_PROJECT --bundler --template=mobile` + Then a directory named "MY_PROJECT" should exist + When I cd to "MY_PROJECT" + Then the following files should exist: + | config.rb | + | Gemfile | + Then the following files should not exist: + | config.ru | \ No newline at end of file