@@ -8,18 +8,23 @@ require 'rake/extensiontask'
8
8
#end
9
9
10
10
# Create the following public tasks:
11
- # * compile # Compile all the extensions
12
- # * compile:mygem # Compile mygem
13
- # * clean # Remove any temporary products
14
- # * clobber # Remove any generated files
11
+ # * compile : Compile all the extensions
12
+ # * compile:mygem : Compile mygem
13
+ # * clean : Remove any temporary products
14
+ # * clobber : Remove any generated files
15
15
Rake ::ExtensionTask . new 'mygem'
16
16
desc 'alias for `compile`'
17
17
task default : :compile
18
18
19
19
# Create the following tasks:
20
- # * test # run tests
21
- # * test:cmd # print the testing command
22
- # * test:isolated # run tests independently to surface order dependencies
23
- # * test:deps # (alias of test:isolated)
24
- # * test:slow # run tests and reports the slowest 25
25
- Minitest ::TestTask . create
20
+ # * test : run tests
21
+ # * test:cmd : print the testing command
22
+ # * test:isolated : run tests independently to surface order dependencies
23
+ # * test:deps : (alias of test:isolated)
24
+ # * test:slow : run tests and reports the slowest 25
25
+ Minitest ::TestTask . create do |t |
26
+ t . extra_args << '-Werror' # Raise exceptions for warnings: https://github.com/minitest/minitest/commit/f0f17b9
27
+ if RUBY_VERSION > '3.3'
28
+ t . test_prelude = 'Warning[:performance] = true' # … including `performance` warnings which are off even with `-w`
29
+ end
30
+ end
0 commit comments