require_relative 'test_helper.rb'

class Rubysermon_test < MiniTest::Unit::TestCase

	def setup
		@app = Rubysermon::App.new
	end

	def test_wrong_refresh_time
		@app.config_path = "#{TEST_PATH}/fixtures/short_repeat_period.json"

		assert_raises(SystemExit) do
			@app.run()
		end
	end

	def test_empty_modules
		@app.config_path = "#{TEST_PATH}/fixtures/empty_modules.json"

		assert_raises(SystemExit) do
			@app.run()
		end
	end

	def test_empty_config1
		@app.config_path = "#{TEST_PATH}/fixtures/empty1.json"

		assert_raises(SystemExit) do
			@app.run()
		end
	end

	def test_empty_config2
		@app.config_path = "#{TEST_PATH}/fixtures/empty2.json"

		assert_raises(SystemExit) do
			@app.run()
		end
	end
end