Skip to content

Instantly share code, notes, and snippets.

@anarchivist
Forked from edsu/test-output.txt
Created September 27, 2011 15:00
Show Gist options
  • Save anarchivist/1245281 to your computer and use it in GitHub Desktop.
Save anarchivist/1245281 to your computer and use it in GitHub Desktop.
mssamac03:ruby-bagit mam54$ time rake spec
(in /Users/mam54/Documents/Code/git/ruby-bagit)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S bundle exec rspec -fs --color "spec/bagit_spec.rb" "spec/fetch_spec.rb" "spec/manifest_spec.rb" "spec/tag_info_spec.rb" "spec/validation_spec.rb"
BagIt::Bag
empty bag
should be empty
bag with files
should be a directory
should not be empty
should have a sub-directory called data
#add_file
should allow addition of files via io
should allow addition of files via copy
should allow addition of files with deep paths
should not allow overwriting of files
#remove_file
should raise an error when deleing non existant files
#get
file not in bag
should return nil
file in bag
should return an IO object for the given path
should have the same content as the file added
should accept an optional leading slash or ./
#paths
should return a non-empty Array of Strings
should return relative paths to all files in the data directory
#gc!
should clean up empty directories
fetch.txt
should not be empty
should only contain lines of the format URL LENGTH FILENAME
should contain manifested files
should be gone when fetch is complete
BagIt Manifests
bag manifest files
should have a manifest file
should only contain bag files
behaves like a manifest file
should have valid algorithm in the name (at least md5 or sha1)
should not be an empty file
should only contain lines of the format CHECKSUM FILENAME
tag manifest files
should have a tag manifest file
should only contain tag files
it should behave like a manifest file
should have valid algorithm in the name (at least md5 or sha1)
should not be an empty file
should only contain lines of the format CHECKSUM FILENAME
Tag Info Files
bagit.txt
should create a file bagit.txt on bag initialization
should have exaclty two lines
should have a bagit version
should have a tag file encoding
bag-info.txt
should not be empty
should contain lines of the format LABEL: VALUE (like an email header)
should be case insensitive with respect to LABELs
should fold long VALUEs
a valid bag
should validate with no errors
should not be lewd (some file is not covered by the manifest)
should not be prude (the manifest covers files that do not exist)
should be consistent (fixity)
Finished in 1.49 seconds
42 examples, 0 failures
real 0m3.995s
user 0m2.291s
sys 0m0.803s
mssamac03:ruby-bagit mam54$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment