Commit da81bbb3 authored by Sylvester Keil's avatar Sylvester Keil

ensure months are parsed to symbols

see #82
parent 77028080
...@@ -184,3 +184,27 @@ Feature: Details ...@@ -184,3 +184,27 @@ Feature: Details
And the "_site/scholar/index.html" file should exist And the "_site/scholar/index.html" file should exist
And I should see "<a[^>]+href=\"/bibliography/ruby/index.html\">" in "_site/scholar/index.html" And I should see "<a[^>]+href=\"/bibliography/ruby/index.html\">" in "_site/scholar/index.html"
And the "_site/bibliography/ruby/index.html" file should exist And the "_site/bibliography/ruby/index.html" file should exist
@generators @parse_months @wip
Scenario: Months are parsed by default
Given I have a scholar configuration with:
| key | value |
| details_layout | details.html |
And I have a "_bibliography" directory
And I have a file "_bibliography/references.bib":
"""
@book{august,
month = {August}
}
"""
And I have a "_layouts" directory
And I have a file "_layouts/details.html":
"""
---
---
{{ page.entry.bibtex }}
"""
When I run jekyll
Then the _site directory should exist
And the "_site/bibliography/august.html" file should exist
And I should see "month = aug" in "_site/bibliography/august.html"
...@@ -18,6 +18,14 @@ Given(/^I have a scholar configuration with:$/) do |table| ...@@ -18,6 +18,14 @@ Given(/^I have a scholar configuration with:$/) do |table|
end end
end end
Given(/^I have the following BibTeX options:$/) do |table|
File.open('_config.yml', 'a') do |f|
f.write(" bibtex_options:\n")
table.hashes.each do |row|
f.write(" #{row["key"]}: #{row["value"]}\n")
end
end
end
Then(/^"(.*)" should come before "(.*)" in "(.*)"$/) do |p1, p2, file| Then(/^"(.*)" should come before "(.*)" in "(.*)"$/) do |p1, p2, file|
data = File.open(file).readlines.join('') data = File.open(file).readlines.join('')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment