Skip to content

Commit

Permalink
Merge branch 'meta'
Browse files Browse the repository at this point in the history
* meta:
  Ensure all book abbreviations are valid.
  • Loading branch information
mattscilipoti committed Oct 29, 2010
2 parents e0c81ef + 8ec6027 commit e88de26
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/bible_reference_parser/metadata/metadata.yml
Expand Up @@ -6,7 +6,7 @@ genesis: &gen
chapter_info: [31, 25, 24, 26, 32, 22, 24, 22, 29, 32, 32, 20, 18, 24, 21, 16, 27, 33, 38, 18, 34, 24, 20, 67, 34, 35, 46, 22, 35, 43, 55, 32, 20, 31, 29, 43, 36, 30, 23, 23, 57, 38, 34, 34, 28, 34, 31, 22, 33, 26]
gen: *gen
gn: *gen
ge: *gen
ge: *gen
exodus: &ex
name: Exodus
short_name: Ex.
Expand Down Expand Up @@ -140,9 +140,9 @@ ecclesiastes: &eccles
name: Ecclesiastes
short_name: Eccles.
chapter_info: [18, 26, 22, 16, 20, 12, 29, 17, 18, 20, 10, 14]
ecc: *ecc
ec: *ec
eccl: *eccl
ecc: *eccles
ec: *eccles
eccl: *eccles
songofsolomon: &song
name: Song of Solomon
short_name: Song.
Expand Down Expand Up @@ -454,4 +454,4 @@ revelation: &rev
name: Revelation
short_name: Rev.
chapter_info: [20, 29, 22, 11, 14, 17, 17, 13, 21, 11, 19, 17, 18, 20, 8, 21, 18, 24, 21, 15, 27, 21]
rev: *rev
rev: *rev
6 changes: 5 additions & 1 deletion spec/bible_metadata_spec.rb
Expand Up @@ -7,6 +7,10 @@
@matthew = "Matthew"
end

it "should have valid abbreviations" do
BibleMetadata.metadata.any? {|book| book[1].is_a?(Syck::BadAlias) }.should_not be_true
end

it "should find the correct book for an all lower-cased name" do
info = BibleMetadata["matthew"]
info.should_not be_nil
Expand Down Expand Up @@ -63,4 +67,4 @@
info["chapter_info"].length.should eql 50
end

end
end

0 comments on commit e88de26

Please sign in to comment.