spec/loggability_spec.rb in loggability-0.15.1 vs spec/loggability_spec.rb in loggability-0.16.0

- old
+ new

@@ -364,9 +364,16 @@ it "can parse a logging config spec with a severity, a path, and a formatter" do result = Loggability.parse_config_spec( 'info /usr/local/www/htdocs/log.html (html)' ) expect( result ).to eq([ 'info', 'html', '/usr/local/www/htdocs/log.html' ]) end + it 'can parse a logging confi spec with a severity, a http service name with its api key' do + result = Loggability.parse_config_spec('warn datadog[datadog_api_key]: (Color)') + expect( result[0] ).to eq( 'warn' ) + expect( result[1] ).to eq( 'Color' ) + expect( result[2].first ).to be_instance_of( Loggability::LogDevice::Datadog ) + end + it "can configure loghosts via its ::configure method" do config = {'class1' => 'debug (html)', 'class2' => 'error spec-error.log'} Loggability.configure( config ) expect( Loggability[class1].level ).to be( :debug )