Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Getting there with the stories...slowly but surely

  • Loading branch information...
commit ea2175b0ed4392dd8f19cbc13985085a34ca3652 1 parent 9d4e169
@qrush qrush authored
View
2  features/create_sites.feature
@@ -17,7 +17,6 @@ Feature: Create sites
When I run jekyll
Then the _site directory should exist
And the _site/posts directory should exist
- And the _site/posts/2009/03/24/hackers.html file should exist
And I should see "My First Exploit" in "_site/posts/2009/03/24/hackers.html"
Scenario: Basic site with layout
@@ -39,7 +38,6 @@ Feature: Create sites
When I run jekyll
Then the _site directory should exist
And the _site/posts directory should exist
- And the _site/posts/2009/03/24/hackers.html file should exist
And I should see "My First Exploit" in "_site/posts/2009/03/24/hackers.html"
And I should see "Basic Site with Layout and a Post: My First Exploit" in "_site/index.html"
View
41 features/embed_filters.feature
@@ -4,7 +4,48 @@ Feature: Embed filters
In order to perform cool stuff in my posts
Scenario: Convert date to XML schema
+ Given I have a blank site
+ And I have a post titled "Date to XML schema" for "3/26/2009" that contains "{{ post.date | date_to_xmlschema }}"
+ When I run jekyll
+ Then the _site directory should exist
+ And the _site/posts directory should exist
+ And the _site/posts/2009/03/26/date-to-xml-schema.html file should exist
+ And I should see "2009-03-26T00:00:00-08:00" in "_site/posts/2009/03/26/date-to-xml-schema.html"
+
Scenario: Escape text for XML
+ Given I have a blank site
+ And I have a post titled "Escape text for XML" for "3/26/2009" that contains "{{ '<tt>Mario & Luigi</tt>' | xml_escape }}"
+ When I run jekyll
+ Then the _site directory should exist
+ And the _site/posts directory should exist
+ And the _site/posts/2009/03/26/escape-text-for-xml.html file should exist
+ And I should see "&lt;tt&gt;Mario &amp; Luigi&lt;tt&gt;" in "_site/posts/2009/03/26/escape-text-for-xml.html"
+
Scenario: Calculate number of words
+ Given I have a blank site
+ And I have a post titled "Calculate number of words" for "3/26/2009" that contains "{{ post.title | number_of_words }}"
+ When I run jekyll
+ Then the _site directory should exist
+ And the _site/posts directory should exist
+ And the _site/posts/2009/03/26/calculate-number-of-words.html file should exist
+ And I should see "4" in "_site/posts/2009/03/26/calculate-number-of-words.html"
+
Scenario: Convert an array into a sentence
+ Given I have a blank site
+ And I have a post titled "Convert array to sentence" for "3/26/2009" with that contains "{{ post.tags | array_to_sentence_string }}"
+ And I have a post titled "Convert array to sentence" for "3/26/2009" with tags "life hacks code"
+ When I run jekyll
+ Then the _site directory should exist
+ And the _site/posts directory should exist
+ And the _site/posts/2009/03/26/convert-array-to-sentence.html file should exist
+ And I should see "life, hacks, and code" in "_site/posts/2009/03/26/convert-array-to-sentence.html"
+
Scenario: Textilize a given string
+ Given I have a blank site
+ And I have a post titled "Textilize" for "3/26/2009" with that contains "{{ post.author | textilize }}"
+ And I have a post titled "Textilize" for "3/26/2009" with author "*Mr. Spock*"
+ When I run jekyll
+ Then the _site directory should exist
+ And the _site/posts directory should exist
+ And the _site/posts/2009/03/26/textilize.html file should exist
+ And I should see "<b>Mr. Spock</b>" in "_site/posts/2009/03/26/textilize.html"
View
26 features/site_configuration.feature
@@ -4,6 +4,14 @@ Feature: Site configuration
In order to make setting up a site easier
Scenario: Change destination directory
+ Given I have a blank site in "_sourcedir"
+ And I have an "index.html" file that contains "Changing source directory"
+ And I have a configuration file in "_sourcedir" with "source" set to "_sourcedir"
+ When I run jekyll
+ Then the _site directory should exist
+ And I should see "Changing source directory" in "_site/index.html"
+
+ Scenario: Change destination directory
Given I have a blank site
And I have an "index.html" file that contains "Changing destination directory"
And I have a configuration file with "site" set to "_mysite"
@@ -36,9 +44,18 @@ Feature: Site configuration
Then the _site directory should exist
And I should see "My awesome site" in "_site/index.html"
+ Scenario: Run server to host generated site
+ Given I have a blank site
+ And I have an "index.html" file that contains "WEBrick to the rescue"
+ And I have a configuration file with "server" set to "true"
+ When I run jekyll
+ And I go to "http://0.0.0.0:4000"
+ Then I should see "WEBrick to the rescue"
+
Scenario: Run server on a different server port
Given I have a blank site
And I have an "index.html" file that contains "Changing Port"
+ And I have a configuration file with "server" set to "true"
And I have a configuration file with "port" set to "1337"
When I run jekyll
And I go to "http://0.0.0.0:1337"
@@ -52,7 +69,6 @@ Feature: Site configuration
When I run jekyll
Then the _site directory should exist
And the _site/posts directory should exist
- And the _site/posts/none-permalink-schema.html file should exist
And I should see "Whoa." in "_site/posts/none-permalink-schema.html"
Scenario: Use pretty permalink schema
@@ -64,8 +80,12 @@ Feature: Site configuration
Then the _site directory should exist
And the _site/posts directory should exist
And the _site/posts/pretty-permalink-schema directory should exist
- And the _site/posts/pretty-permalink-schema/index.html file should exist
And I should see "Whoa." in "_site/posts/pretty-permalink-schema/index.html"
Scenario: Highlight code with pygments
-
+ Given I have a blank site
+ And I have an "index.html" file that contains "{% highlight ruby %} puts 'Hello world!' {% endhighlight %}"
+ And I have a configuration file with "pygments" set to "true"
+ When I run jekyll
+ Then the _site directory should exist
+ And I should see "puts 'Hello world!'" in "_site/index.html"
View
23 features/site_data.feature
@@ -4,8 +4,29 @@ Feature: Site data
In order to make the site slightly dynamic
Scenario: Use page variable in a page
+ Given I have a blank site
+ And I have an "contact.html" file with title "Contact" that contains "{{ page.title }}: email@me.com"
+ When I run jekyll
+ Then the _site directory should exist
+ And I should see "Contact: email@me.com" in "_site/index.html"
+
Scenario: Use site.time variable
- Scenario: Use site.posts variable
+ Given I have a blank site
+ And I have an "index.html" file that contains "Generated on: {{ site.time }}"
+ When I run jekyll
+ Then the _site directory should exist
+ And I should see "Generated on: #{Date.today.strftime("%Y-%m-%d")}" in "_site/index.html"
+
+ Scenario: Use site.posts variable for first post
+ Given I have a blank site
+ And I have an "index.html" file that contains "{{ site.posts.first.title }}: {{ site.posts.first.url }}"
+ And I have a post titled "First Post" for "3/25/2009" that contains "Whoa."
+ And I have a post titled "Pretty Permalink Schema" for "3/25/2009" that contains "Whoa."
+ And I have a post titled "Pretty Permalink Schema" for "3/25/2009" that contains "Whoa."
+ When I run jekyll
+ Then the _site directory should exist
+ And I should see "Generated on: #{Date.today.strftime("%Y-%m-%d")}" in "_site/index.html"
+
Scenario: Use site.categories variable
Scenario: Use site.categories.life variable
Scenario: Use site.related_posts variable
Please sign in to comment.
Something went wrong with that request. Please try again.