Permalink
Browse files

Don't use 'should' in example description

  • Loading branch information...
1 parent 756e3d4 commit ce6aeac67e9719ef8197b7728e2333917b9ecb35 @chdorner committed Jun 17, 2012
Showing with 23 additions and 23 deletions.
  1. +14 −14 spec/lib/epubinfo/models/book_spec.rb
  2. +6 −6 spec/lib/epubinfo/parser_spec.rb
  3. +3 −3 spec/lib/epubinfo/utils_spec.rb
@@ -18,47 +18,47 @@
its(:drm_protected?) { should be_false }
context 'creators' do
- it 'count should be 1' do
+ it 'count is 1' do
subject.creators.count.should == 1
end
- it 'values should be of type Person' do
+ it 'values are of type Person' do
subject.creators.each do |creator|
creator.should be_kind_of EPUBInfo::Models::Person
end
end
end
context 'contributors' do
- it 'count should be 1' do
+ it 'count is 1' do
subject.contributors.count.should == 1
end
- it 'values should be of type Person' do
+ it 'values are of type Person' do
subject.contributors.each do |contributor|
contributor.should be_kind_of EPUBInfo::Models::Person
end
end
end
context 'dates' do
- it 'count should be 1' do
+ it 'count is 1' do
subject.dates.count.should == 2
end
- it 'values should be of type Date' do
+ it 'values are of type Date' do
subject.dates.each do |date|
date.should be_kind_of EPUBInfo::Models::Date
end
end
end
context 'identifiers' do
- it 'count should be 1' do
+ it 'count is 1' do
subject.identifiers.count.should == 1
end
- it 'values should be of type Identifier' do
+ it 'values are of type Identifier' do
subject.identifiers.each do |identifier|
identifier.should be_kind_of EPUBInfo::Models::Identifier
end
@@ -81,35 +81,35 @@
its(:rights) { should == 'This work is shared with the public using the Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license.' }
context 'creators' do
- it 'count should be 1' do
+ it 'count is 1' do
subject.creators.count.should == 1
end
- it 'values should be of type Person' do
+ it 'values are of type Person' do
subject.creators.each do |creator|
creator.should be_kind_of EPUBInfo::Models::Person
end
end
end
context 'contributors' do
- it 'count should be 0' do
+ it 'count is 0' do
subject.contributors.count.should == 0
end
end
context 'dates' do
- it 'count should be 1' do
+ it 'count is 1' do
subject.dates.count.should == 1
end
end
context 'identifiers' do
- it 'count should be 1' do
+ it 'count is 1' do
subject.identifiers.count.should == 1
end
- it 'values should be of type Identifier' do
+ it 'values are of type Identifier' do
subject.identifiers.each do |identifier|
identifier.should be_kind_of EPUBInfo::Models::Identifier
end
@@ -4,38 +4,38 @@
let(:epub_path) { File.expand_path('spec/support/binary/metamorphosis_epub2.epub') }
subject { EPUBInfo::Parser.parse(epub_path) }
- it 'should expose the path' do
+ it 'exposes the path' do
subject.path.should == epub_path
end
- it 'should expose the correct metadata document' do
+ it 'exposes the correct metadata document' do
subject.metadata_document.should be_kind_of Nokogiri::XML::Document
id_node = subject.metadata_document.xpath('//dc:identifier').first
id_node.content.should == 'http://www.gutenberg.org/ebooks/5200'
end
- it 'should return true for drm protected files' do
+ it 'returns true for drm protected files' do
drm_path = 'spec/support/binary/metamorphosis_epub2_drm.epub'
parser = EPUBInfo::Parser.parse(drm_path)
parser.drm_protected?.should be_true
end
- it 'should return false for non-drm protected files' do
+ it 'returns false for non-drm protected files' do
non_drm_path = 'spec/support/binary/metamorphosis_epub2.epub'
parser = EPUBInfo::Parser.parse(non_drm_path)
parser.drm_protected?.should be_false
end
context 'unsupported file types' do
- it 'should raise NotAnEPUBFileError when zip but no epub file' do
+ it 'raises NotAnEPUBFileError when zip but no epub file' do
lambda do
zip_path = 'spec/support/binary/zip_file.zip'
parser = EPUBInfo::Parser.parse(zip_path)
parser.metadata_document
end.should raise_error(EPUBInfo::NotAnEPUBFileError)
end
- it 'should raise NotAnEPUBFileError when not even zip file' do
+ it 'raises NotAnEPUBFileError when not even zip file' do
lambda do
image_path = 'spec/support/binary/cover.jpg'
parser = EPUBInfo::Parser.parse(image_path)
@@ -2,15 +2,15 @@
describe EPUBInfo::Utils do
describe '#parse_iso_8601_date' do
- it 'should parse only year' do
+ it 'parses only year' do
EPUBInfo::Utils.parse_iso_8601_date('2012').should == Date.new(2012, 1, 1)
end
- it 'should parse only year, and month' do
+ it 'parses only year, and month' do
EPUBInfo::Utils.parse_iso_8601_date('2012-02').should == Date.new(2012, 2, 1)
end
- it 'should parse year, month, and day' do
+ it 'parses year, month, and day' do
EPUBInfo::Utils.parse_iso_8601_date('2012-02-03').should == Date.new(2012, 2, 3)
end
end

1 comment on commit ce6aeac

Contributor

christoffer commented on ce6aeac Jun 17, 2012

A+ Commit if you ask me ;)

Please sign in to comment.