diff --git a/features/details.feature b/features/details.feature index 8ff1b7682af1ad46cd917329895f4641883604b3..a184d0c471864f01d5d56bb4a2ecfef75e23898e 100644 --- a/features/details.feature +++ b/features/details.feature @@ -184,3 +184,27 @@ Feature: Details And the "_site/scholar/index.html" file should exist And I should see "]+href=\"/bibliography/ruby/index.html\">" in "_site/scholar/index.html" 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" diff --git a/features/step_definitions/scholar_steps.rb b/features/step_definitions/scholar_steps.rb index 059fa5694e9d2eaf578c27109a4748fc2c016eec..32046e92f7bca91431ad4c1752801aabac74c1f7 100644 --- a/features/step_definitions/scholar_steps.rb +++ b/features/step_definitions/scholar_steps.rb @@ -18,6 +18,14 @@ Given(/^I have a scholar configuration with:$/) do |table| 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| data = File.open(file).readlines.join('')