Added a sample Ogg Vorbis file, so we don't depend on oggenc in the tests.
authorTilman Sauerbeck <tilman@code-monkey.de>
Wed, 16 Aug 2006 17:09:55 +0000 (19:09 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Wed, 16 Aug 2006 17:09:55 +0000 (19:09 +0200)
test/sample.ogg [new file with mode: 0644]
test/test_main.rb

diff --git a/test/sample.ogg b/test/sample.ogg
new file mode 100644 (file)
index 0000000..75676a5
Binary files /dev/null and b/test/sample.ogg differ
index 3d7ca7716ed25a50c77496e4cce604217ee708c5..3003783554337a3bd3b2b05722ea3d29d414038a 100644 (file)
@@ -1,30 +1,12 @@
 require "test/unit"
 require "ogg/vorbis/tagger"
 require "fileutils"
-require "open3"
 
 class MainTest < Test::Unit::TestCase
        OGG_FILE = "test/test.ogg"
 
        def setup
-               tmp =<<EOF
--c "artist=Bolt Thrower" -c "album=...For Victory" -c "date=1994"
-EOF
-
-               f = File.open(OGG_FILE, "w")
-               cmd = "oggenc -q 0 #{tmp.strip} -r -"
-
-               Open3.popen3(cmd) do |sin, sout, _|
-                       sin.write("\0\0\0\0")
-                       sin.close
-
-                       begin
-                               tmp = sout.read
-                               f << tmp
-                       end while !tmp.length.zero?
-               end
-
-               f.close
+               FileUtils.cp("test/sample.ogg", OGG_FILE)
        end
 
        def teardown