Sha256: e83e4335644d2f6e98e807cc0a624e4b4f53776c8fb641c82c08c0f37178e1a3
Contents?: true
Size: 1.91 KB
Versions: 3
Compression:
Stored size: 1.91 KB
Contents
require "spec_helper" include BibleReferenceParser describe BibleMetadata do before :all do @matthew = "Matthew" end it "should find the correct book for an all lower-cased name" do info = BibleMetadata["matthew"] info.should_not be_nil info["name"].should eql @matthew end it "should find the correct book for a title-cased name" do info = BibleMetadata["Matthew"] info.should_not be_nil info["name"].should eql @matthew end it "should find the correct book for an all upper-cased name" do info = BibleMetadata["MATTHEW"] info.should_not be_nil info["name"].should eql @matthew end it "should find the correct book for an abbreviated name" do info = BibleMetadata["matt"] info.should_not be_nil info["name"].should eql @matthew end it "should find the correct book for an abbreviated name with a period at the end" do info = BibleMetadata["Matt."] info.should_not be_nil info["name"].should eql @matthew end it "should find the correct book for a name given with spaces" do info = BibleMetadata["Song of Solomon"] info.should_not be_nil info["name"].should eql "Song of Solomon" end it "should find the correct book for a name beginning with a number" do info = BibleMetadata["1 Samuel"] info.should_not be_nil info["name"].should eql "1 Samuel" end it "should return nil for a name that can't be found" do info = BibleMetadata["anathema"] info.should be_nil end it "should return the book's name, short_name, number of chapters and an chapter info array" do info = BibleMetadata["genesis"] info.should_not be_nil info["name"].should eql "Genesis" info["short_name"].should eql "Gen." info["chapter_info"].should be_kind_of Array info["chapter_info"].length.should eql 50 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bible_reference_parser-0.1.3 | spec/bible_metadata_spec.rb |
bible_reference_parser-0.1.2 | spec/bible_metadata_spec.rb |
bible_reference_parser-0.1.1 | spec/bible_metadata_spec.rb |