Sha256: f7c6787cf676d6511bad1fc58fd0dc5318d67d3716796497e1d7258d6fa3a558

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__)+"/../lib")
$:.unshift(File.dirname(__FILE__)+"/../ext")
require 'tagfile'
require 'test/unit'
class RTagFileReadTestCase < Test::Unit::TestCase
	def setup

	    @file=::TagFile::File.new(File.dirname(__FILE__)+"/../data/440Hz-5sec.mp3")
	end
	def test_title()
		assert_equal("440Hz Sine Wave",@file.title)
	end
	def test_artist()
		assert_equal("Dr. Lex",@file.artist)
	end
	def test_album()
		assert_equal("http://www.dr-lex.be/",@file.album)
	end
	def test_genre()
		assert_equal("Lo-Fi",@file.genre)
	end
	def test_track()
		assert_equal(1,@file.track)
	end
	def test_year()
		assert_equal(2008,@file.year)
	end
	def test_comment()
		assert_equal("http://www.dr-lex.be/software/testsounds.html",@file.comment)
	end
	def test_length()
		assert_equal(5, @file.length)
	end
	def test_bitrate()
		assert_equal(48, @file.bitrate)
	end
	def test_samplerate()
		assert_equal(44100,@file.samplerate)
	end
	def test_channels()
		assert_equal(1,@file.channels)
	end
end

# arch-tag: test

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rtaglib-0.3.0 test/test_read.rb