Commit 9ed886d6 authored by Sylvester Keil's avatar Sylvester Keil

added sort-by none example

#1
parent 22d2c30a
......@@ -2,8 +2,8 @@ Feature: Sorting BibTeX Bibliographies
As a scholar who likes to blog
I want to sort my bibliographies according to configurable parameters
Scenario: Sort Bibliography by Year
Given I have a configuration file with "citation_sort_order" set to "year"
Scenario Outline: Sort Bibliography
Given I have a configuration file with "citation_sort_order" set to "<sort-by>"
And I have a page "references.bib":
"""
---
......@@ -22,4 +22,10 @@ Feature: Sorting BibTeX Bibliographies
}
"""
When I run jekyll
And I should see "\(2007\)\.+\(2008\)" in "_site/references.html"
Then "<pattern-1>" should come before "<pattern-2>" in "_site/references.html"
Scenarios: Various Sort Orders
| sort-by | pattern-1 | pattern-2 |
| none | 2008 | 2007 |
| year | 2007 | 2008 |
\ No newline at end of file
Given /^I have a page "([^"]*)":$/ do |file, string|
File.open(file, 'w') do |f|
f.write(string)
f.write(string)
end
end
Then /^"(.*)" should come before "(.*)" in "(.*)"$/ do |p1, p2, file|
data = File.open(file).readlines.join('')
m1 = data.match(p1)
m2 = data.match(p2)
assert m1.offset(0)[0] < m2.offset(0)[0]
end
......@@ -21,16 +21,16 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('jekyll', '~> 0.10')
s.add_runtime_dependency('citeproc-ruby', '~> 0.0.6')
s.add_runtime_dependency('bibtex-ruby', '~> 2.0.5')
s.add_development_dependency('bundler', '~> 1.1')
s.add_development_dependency('rdoc', '~> 3.12')
s.add_development_dependency('rake', '~> 0.9')
s.add_development_dependency('redgreen', ">= 1.2.2")
s.add_development_dependency('shoulda', ">= 2.11.3")
s.add_development_dependency('rr', ">= 1.0.2")
s.add_development_dependency('cucumber', ">= 0.10.0")
s.add_development_dependency('RedCloth', ">= 4.2.1")
s.add_development_dependency('rdiscount', ">= 1.6.5")
s.add_development_dependency('rake', "~> 0.9")
s.add_development_dependency('rdoc', "~> 3.11")
s.add_development_dependency('redgreen', "~> 1.2")
s.add_development_dependency('shoulda', "~> 2.11")
s.add_development_dependency('rr', "~> 1.0")
s.add_development_dependency('cucumber', "1.1")
s.add_development_dependency('RedCloth', "~> 4.2")
s.add_development_dependency('rdiscount', "~> 1.6")
s.add_development_dependency('redcarpet', "~> 1.9")
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
......
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