2014-01-10 21:02:52 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
|
|
describe IcecastLogging do
|
|
|
|
|
|
|
|
|
|
let(:iobj) { IcecastLogging.new }
|
2014-01-16 03:29:52 +00:00
|
|
|
let(:output) { StringIO.new }
|
2014-01-10 21:02:52 +00:00
|
|
|
|
|
|
|
|
it "save" do
|
|
|
|
|
iobj.save.should be_true
|
2014-01-16 03:29:52 +00:00
|
|
|
iobj.dumpXml(1, output)
|
|
|
|
|
|
|
|
|
|
output.rewind
|
|
|
|
|
directory = Nokogiri::XML(output)
|
|
|
|
|
directory.css('logging accesslog').text.should == "access.log"
|
|
|
|
|
directory.css('logging errorlog').text.should == "error.log"
|
|
|
|
|
directory.css('logging loglevel').text.should == "4"
|
|
|
|
|
directory.css('logging playlistlog').text.should == "playlist.log"
|
|
|
|
|
|
2014-01-10 21:02:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|