require_relative '../../test_helper.rb'

class ModLoader_test < MiniTest::Unit::TestCase

	def test_load_non_existing_file
		assert_raises(Rubysermon::ModLoaderException) do
			Rubysermon::ModLoader.load '_what_the_fuck_'
		end
	end

	def test_load_existing_file
		possible_mods = %w(cpu Cpu CPU)
		possible_mods.each do |mod|
			assert_equal((Rubysermon::ModLoader.load mod).class.to_s, 'Rubysermon::Cpu')
		end
	end
end