Skip to content

Commit

Permalink
Add a new "lesson"
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmaroli committed Mar 3, 2017
1 parent 247f094 commit 9efe212
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
9 changes: 5 additions & 4 deletions features/collections.feature
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Collections: Getting Started, Let's Roll!, Dive-In and Publish Already!, Tip of the Iceberg, Graduation Day" in "_site/index.html"
And I should see "Collections: Getting Started, Let's Roll!, Dive-In and Publish Already!, Tip of the Iceberg, Extending with Plugins, Graduation Day" in "_site/index.html"
And I should not see "Previous: Graduation Day" in "_site/tutorials/lets-roll.html"
And I should not see "Next: Tip of the Iceberg" in "_site/tutorials/lets-roll.html"
But I should see "Previous: Getting Started" in "_site/tutorials/lets-roll.html"
Expand Down Expand Up @@ -225,7 +225,7 @@ Feature: Collections
Then I should get a zero exit status
Then the _site directory should exist
And I should see "'time' not defined" in the build output
And I should see "Collections: Dive-In and Publish Already!, Getting Started, Graduation Day, Let's Roll!, Tip of the Iceberg" in "_site/index.html"
And I should see "Collections: Dive-In and Publish Already!, Extending with Plugins, Getting Started, Graduation Day, Let's Roll!, Tip of the Iceberg" in "_site/index.html"
And I should see "Previous: Graduation Day" in "_site/tutorials/lets-roll.html"
And I should see "Next: Tip of the Iceberg" in "_site/tutorials/lets-roll.html"

Expand Down Expand Up @@ -257,12 +257,13 @@ Feature: Collections
- lets-roll.md
- dive-in-and-publish-already.md
- graduation-day.md
- extending-with-plugins
"""
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Collections: Getting Started, Tip of the Iceberg, Let's Roll!, Dive-In and Publish Already!, Graduation Day" in "_site/index.html"
And I should see "Collections: Getting Started, Tip of the Iceberg, Let's Roll!, Dive-In and Publish Already!, Graduation Day, Extending with Plugins" in "_site/index.html"
And I should not see "Previous: Graduation Day" in "_site/tutorials/lets-roll.html"
And I should not see "Next: Tip of the Iceberg" in "_site/tutorials/lets-roll.html"
But I should see "Previous: Tip of the Iceberg" in "_site/tutorials/lets-roll.html"
Expand Down Expand Up @@ -300,7 +301,7 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Collections: Getting Started, Let's Roll!, Dive-In and Publish Already!, Graduation Day, Tip of the Iceberg" in "_site/index.html"
And I should see "Collections: Getting Started, Let's Roll!, Dive-In and Publish Already!, Graduation Day, Extending with Plugins, Tip of the Iceberg" in "_site/index.html"
And I should not see "Previous: Graduation Day" in "_site/tutorials/lets-roll.html"
And I should not see "Previous: Tip of the Iceberg" in "_site/tutorials/lets-roll.html"
And I should not see "Next: Tip of the Iceberg" in "_site/tutorials/lets-roll.html"
Expand Down
9 changes: 9 additions & 0 deletions test/source/_tutorials/extending-with-plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Extending with Plugins"
lesson: 5
time: 1 min
---

A lot can be accomplished by using Jekyll out-of-the-box. But a lot more can be achieved by using plugins that extend Jekyll's functionality. There are numerous plugins supported by the official team and many other third-party plugins provided by the Jekyll Community.

Check this [documentation page](https://jekyllrb.com/docs/plugins/) dedicated to working with plugins.
2 changes: 1 addition & 1 deletion test/source/_tutorials/graduation-day.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Graduation Day"
lesson: 5
lesson: 6
time: 10 mins
---

Expand Down
8 changes: 6 additions & 2 deletions test/test_collections.rb
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ class TestCollections < JekyllUnitTest
"FrontMatter key 'lesson'" do
default_tuts_array = %w(
_tutorials/dive-in-and-publish-already.md
_tutorials/extending-with-plugins.md
_tutorials/getting-started.md
_tutorials/graduation-day.md
_tutorials/lets-roll.md
Expand All @@ -204,6 +205,7 @@ class TestCollections < JekyllUnitTest
_tutorials/lets-roll.md
_tutorials/dive-in-and-publish-already.md
_tutorials/tip-of-the-iceberg.md
_tutorials/extending-with-plugins.md
_tutorials/graduation-day.md
)
refute_equal default_tuts_array, @actual_array
Expand All @@ -226,6 +228,7 @@ class TestCollections < JekyllUnitTest
"dive-in-and-publish-already.md",
"tip-of-the-iceberg.md",
"graduation-day.md",
"extending-with-plugins.md"
],
},
},
Expand All @@ -236,10 +239,10 @@ class TestCollections < JekyllUnitTest
@actual_array = @tutorials_collection.docs.map(&:relative_path)
end

should "sort documents in a collection with 'sort_by' metadata set to a " \
"FrontMatter key 'lesson'" do
should "sort documents in a collection in the order outlined in the config file" do
default_tuts_array = %w(
_tutorials/dive-in-and-publish-already.md
_tutorials/extending-with-plugins.md
_tutorials/getting-started.md
_tutorials/graduation-day.md
_tutorials/lets-roll.md
Expand All @@ -251,6 +254,7 @@ class TestCollections < JekyllUnitTest
_tutorials/dive-in-and-publish-already.md
_tutorials/tip-of-the-iceberg.md
_tutorials/graduation-day.md
_tutorials/extending-with-plugins.md
)
refute_equal default_tuts_array, @actual_array
assert_equal tuts_rearranged_in_config_array, @actual_array
Expand Down

0 comments on commit 9efe212

Please sign in to comment.