func Test_Logger_NewWithDevNull(t *testing.T) { logger, err := New("null") assert.Nil(t, err) assert.IsType(t, (*os.File)(nil), logger.out) logger, err = New("nil") assert.Nil(t, err) assert.IsType(t, (*os.File)(nil), logger.out) }
func Test_Logger_NewWithFile(t *testing.T) { filename := "logger-testing" logger, err := New(filename) assert.Nil(t, err) assert.IsType(t, (*os.File)(nil), logger.out) os.Remove(filename) }