bibtex.feature 1.63 KB
Newer Older
Sylvester Keil's avatar
Sylvester Keil committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Feature: BibTeX
  As a scholar who likes to blog
  I want to publish my BibTeX bibliography on my blog
  In order to share my awesome references with my peers

	Scenario: Simple Bibliography
		Given I have a configuration file with "citation_style" set to "apa"
	  And I have a page "references.bib":
			"""
			---
			---
			@book{ruby,
			  title     = {The Ruby Programming Language},
			  author    = {Flanagan, David and Matsumoto, Yukihiro},
			  year      = {2008},
			  publisher = {O'Reilly Media}
			}
			"""
	  When I run jekyll
	  Then the _site directory should exist
		And the "_site/references.html" file should exist
	  And I should see "<i>The Ruby Programming Language</i>" in "_site/references.html"
Sylvester Keil's avatar
Sylvester Keil committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

	Scenario: Markdown Formatted Bibliography
		Given I have a configuration file with "citation_style" set to "apa"
	  And I have a page "references.bib":
			"""
			---
			---
			References
			==========
			
			@book{ruby,
			  title     = {The Ruby Programming Language},
			  author    = {Flanagan, David and Matsumoto, Yukihiro},
			  year      = {2008},
			  publisher = {O'Reilly Media}
			}
			"""
	  When I run jekyll
	  Then I should see "<h1[^>]*>References</h1>" in "_site/references.html"
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

  @latex
	Scenario: Simple Bibliography with LaTeX directives
		Given I have a configuration file with "citation_style" set to "apa"
	  And I have a page "references.bib":
			"""
			---
			---
			@misc{umlaut,
			  title     = {Look, an umlaut: \"u!},
			}
			"""
	  When I run jekyll
	  Then the _site directory should exist
		And the "_site/references.html" file should exist
	  And I should see "Look, an umlaut: ü!" in "_site/references.html"