Sha256: 61bf80cc3fefaaf0042d61d9d59af8f85fa2c98c0e9537883abba3ce03668a2b

Contents?: true

Size: 1.8 KB

Versions: 9

Compression:

Stored size: 1.8 KB

Contents

require File.join(File.dirname(__FILE__), "spec_helper")

describe "Creating a resume from a text" do
  before do
    sample = File.join(File.dirname(__FILE__), '..', 'examples', 'sample.resume')
    text = File.read(sample)
    @resume = ResumeTools::Resume.from_text(text)
  end
  
  it "should create a resume" do
    @resume.should be_instance_of(ResumeTools::Resume)
  end
  
  it "should have the correct contact info" do
    @resume.full_name.should == "Thomas B. Seeker"
    @resume.address1.should == "1234 Northern Star Circle"
    @resume.address2.should == "Baltimore, MD 12345"
    @resume.telephone.should == "(410) 555-1212"
  end
  
  it "should have 7 sections" do
    @resume.should have(7).sections
  end
  
  it "should have sections in order" do
    @resume.sections.map { |s| s.title }.should == [
      "Career Goal",
      "Qualifications Summary", 
      "Technical Skills", 
      "Professional Experience", 
      "Education", 
      "Specialized Training", 
      "Certification, Honors, and Professional Affiliations"
    ]
  end
  
  it "should have a paragraph in the Career Goal section" do
    @resume.sections[0].para.should_not be_blank
  end
  
  it "should have a paragraph in the Qualifications Summary section" do
    @resume.sections[1].para.should_not be_blank
  end
  
  it "should have 4 items in the Technical Skills section" do
    @resume.sections[2].should have(4).items
  end
  
  it "should have 3 periods in the Professional Experience section" do
    @resume.sections[3].should have(3).periods
  end
  
  it "should have 3 items in the Systems Engineer period" do
    @resume.sections[3].periods[0].should have(3).items
  end
  
  it "should have proper dates" do
    @resume.sections[3].periods[0].dtstart.should == "1993"
    @resume.sections[3].periods[0].dtend.should == "Present"
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
virgild-resumetools-0.2.2 spec/read_resume_spec.rb
virgild-resumetools-0.2.3 spec/read_resume_spec.rb
virgild-resumetools-0.2.4.1 spec/read_resume_spec.rb
virgild-resumetools-0.2.4 spec/read_resume_spec.rb
virgild-resumetools-0.2.5.0 spec/read_resume_spec.rb
virgild-resumetools-0.2.5.1 spec/read_resume_spec.rb
virgild-resumetools-0.2.5.2 spec/read_resume_spec.rb
resumetools-0.2.7.6 spec/read_resume_spec.rb
resumetools-0.2.7.0 spec/read_resume_spec.rb