Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
caesr-pub
jekyll-scholar
Commits
f56c9efd
Commit
f56c9efd
authored
Apr 13, 2014
by
Sylvester Keil
Browse files
add cited-only tests
parent
530ce2a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
features/cited_only.feature
0 → 100644
View file @
f56c9efd
Feature
:
Cited-only Bibliographies
As a scholar who likes to blog
I want to cite references on my website
And generate bibliographies for the cited items
Scenario
:
Cited-only references from a single bibliography
Given I have a scholar configuration with
:
|
key
|
value
|
|
source
|
./_bibliography
|
And
I have a
"_bibliography"
directory
And I have a file "_bibliography/references.bib"
:
"""
@book{ruby,
title = {The Ruby Programming Language},
author = {Flanagan, David and Matsumoto, Yukihiro},
year = {2008},
publisher = {O'Reilly Media}
},
@book{smalltalk,
title = {Smalltalk Best Practice Patterns},
author = {Kent Beck},
year = {1996},
publisher = {Prentice Hall}
}
"""
And I have a page "scholar.html"
:
"""
---
---
{% cite smalltalk %}
{% bibliography --cited %}
"""
When
I run jekyll
Then
the _site directory should exist
And
the
"_site/scholar.html"
file should exist
And
I should not see
"<i>The Ruby Programming Language</i>"
in
"_site/scholar.html"
And
I should see
"<i>Smalltalk Best Practice Patterns</i>"
in
"_site/scholar.html"
Scenario
:
No-cited items result in empty bibliography
Given I have a scholar configuration with
:
|
key
|
value
|
|
source
|
./_bibliography
|
And
I have a
"_bibliography"
directory
And I have a file "_bibliography/references.bib"
:
"""
@book{ruby,
title = {The Ruby Programming Language},
author = {Flanagan, David and Matsumoto, Yukihiro},
year = {2008},
publisher = {O'Reilly Media}
},
@book{smalltalk,
title = {Smalltalk Best Practice Patterns},
author = {Kent Beck},
year = {1996},
publisher = {Prentice Hall}
}
"""
And I have a page "scholar.html"
:
"""
---
---
{% bibliography --cited %}
"""
When
I run jekyll
Then
the _site directory should exist
And
the
"_site/scholar.html"
file should exist
And
I should not see
"<i>The Ruby Programming Language</i>"
in
"_site/scholar.html"
And
I should not see
"<i>Smalltalk Best Practice Patterns</i>"
in
"_site/scholar.html"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment