spec/read_resume_spec.rb in resumetools-0.2.7.6 vs spec/read_resume_spec.rb in resumetools-0.2.8
- old
+ new
@@ -4,58 +4,58 @@
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
+ expect(@resume.sections.length).to eq 7
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",
+ "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
+ expect(@resume.sections[2].items.length).to eq 4
end
-
+
it "should have 3 periods in the Professional Experience section" do
- @resume.sections[3].should have(3).periods
+ expect(@resume.sections[3].periods.length).to eq 3
end
-
+
it "should have 3 items in the Systems Engineer period" do
- @resume.sections[3].periods[0].should have(3).items
+ expect(@resume.sections[3].periods[0].items.length).to eq 3
end
-
+
it "should have proper dates" do
- @resume.sections[3].periods[0].dtstart.should == "1993"
- @resume.sections[3].periods[0].dtend.should == "Present"
+ expect(@resume.sections[3].periods[0].dtstart).to eq "1993"
+ expect(@resume.sections[3].periods[0].dtend).to eq "Present"
end
end
\ No newline at end of file