mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Workaround for Minitest5
This commit is contained in:
		
							parent
							
								
									7050f86ae1
								
							
						
					
					
						commit
						1fe2b7f41c
					
				
				
				Notes:
				
					git
				
				2020-05-08 07:39:31 +09:00 
				
			
			
			
		
		
					 2 changed files with 5 additions and 0 deletions
				
			
		|  | @ -181,10 +181,12 @@ module MiniTest | ||||||
|     def _assertions= n # :nodoc: |     def _assertions= n # :nodoc: | ||||||
|       @_assertions = n |       @_assertions = n | ||||||
|     end |     end | ||||||
|  |     alias assertions= _assertions= | ||||||
| 
 | 
 | ||||||
|     def _assertions # :nodoc: |     def _assertions # :nodoc: | ||||||
|       @_assertions ||= 0 |       @_assertions ||= 0 | ||||||
|     end |     end | ||||||
|  |     alias assertions _assertions | ||||||
| 
 | 
 | ||||||
|     ## |     ## | ||||||
|     # Fails unless +test+ is a true value. |     # Fails unless +test+ is a true value. | ||||||
|  |  | ||||||
|  | @ -1372,6 +1372,9 @@ class TestMiniTestUnitTestCase < MiniTest::Unit::TestCase | ||||||
|                   assert_not_same assert_nothing_raised |                   assert_not_same assert_nothing_raised | ||||||
|                   assert_nothing_thrown assert_raise] |                   assert_nothing_thrown assert_raise] | ||||||
| 
 | 
 | ||||||
|  |     # These are compatibility methods for Minitest 5 | ||||||
|  |     ignores += %w[assertions assertions=] | ||||||
|  | 
 | ||||||
|     asserts = methods.grep(/^assert/).sort - ignores |     asserts = methods.grep(/^assert/).sort - ignores | ||||||
|     refutes = methods.grep(/^refute/).sort - ignores |     refutes = methods.grep(/^refute/).sort - ignores | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Hiroshi SHIBATA
						Hiroshi SHIBATA