Remove use of any_instance_of in runner spec
In EE we prepend a module into BuildFinishedWorker. This would cause this spec to fail because RSpec doesn't support the use of "any_instance_of" with classes that include a prepended module. To work around this we just stub the "perform_async" class method instead of stubbing the "perform" instance method.
This commit is contained in:
		
							parent
							
								
									65348cf07b
								
							
						
					
					
						commit
						e47a2ca30a
					
				| 
						 | 
				
			
			@ -700,7 +700,7 @@ describe API::Runner do
 | 
			
		|||
 | 
			
		||||
      context 'when tace is given' do
 | 
			
		||||
        it 'creates a trace artifact' do
 | 
			
		||||
          allow_any_instance_of(BuildFinishedWorker).to receive(:perform).with(job.id) do
 | 
			
		||||
          allow(BuildFinishedWorker).to receive(:perform_async).with(job.id) do
 | 
			
		||||
            CreateTraceArtifactWorker.new.perform(job.id)
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue