run before step handlers, before matching step, closes #147
Этот коммит содержится в:
		
							родитель
							
								
									a15ef6e29a
								
							
						
					
					
						коммит
						029c7ad8c6
					
				
					 1 изменённых файлов: 5 добавлений и 5 удалений
				
			
		
							
								
								
									
										10
									
								
								suite.go
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								suite.go
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -238,6 +238,11 @@ func (s *Suite) matchStep(step *gherkin.Step) *StepDef {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
func (s *Suite) runStep(step *gherkin.Step, prevStepErr error) (err error) {
 | 
			
		||||
	// run before step handlers
 | 
			
		||||
	for _, f := range s.beforeStepHandlers {
 | 
			
		||||
		f(step)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	match := s.matchStep(step)
 | 
			
		||||
	s.fmt.Defined(step, match)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -295,11 +300,6 @@ func (s *Suite) runStep(step *gherkin.Step, prevStepErr error) (err error) {
 | 
			
		|||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// run before step handlers
 | 
			
		||||
	for _, f := range s.beforeStepHandlers {
 | 
			
		||||
		f(step)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	err = s.maybeSubSteps(match.run())
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Загрузка…
	
	Создание таблицы
		
		Сослаться в новой задаче