1 require 'minitest/autorun'
3 require 'active_support/core_ext'
5 class TestCollectionCreate < Minitest::Test
9 def test_small_collection
10 uuid = Digest::MD5.hexdigest(foo_manifest) + '+' + foo_manifest.size.to_s
11 out, err = capture_subprocess_io do
12 assert_arv('--format', 'uuid', 'collection', 'create', '--collection', {
14 manifest_text: foo_manifest
17 assert /^([0-9a-z]{5}-4zz18-[0-9a-z]{15})?$/.match(out)
24 expect = case args.first
31 system(['./bin/arv', 'arv'], *args),
32 "`arv #{args.join ' '}` " +
33 "should exit #{if expect then 0 else 'non-zero' end}")
37 ". #{Digest::MD5.hexdigest('foo')}+3 0:3:foo\n"