File tree 4 files changed +42
-1
lines changed
4 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 23
23
ruby-version : ${{ matrix.ruby }}
24
24
- name : Install dependencies
25
25
run : bundle install
26
- - name : Run tests
26
+ - name : Run rubocop
27
27
run : bundle exec rake rubocop
28
+ - name : Run tests
29
+ run : bundle exec rake test
Original file line number Diff line number Diff line change 14
14
15
15
require 'bundler/gem_tasks'
16
16
require 'rubocop/rake_task'
17
+ require 'rake/testtask'
17
18
18
19
desc 'Execute RuboCop static code analysis'
19
20
RuboCop ::RakeTask . new ( :rubocop ) do |t |
20
21
t . patterns = %w( lib ios_tests android_tests )
21
22
t . options = %w( -D )
22
23
t . fail_on_error = true
23
24
end
25
+
26
+ desc ( 'Run all unit tests in test directory' )
27
+ Rake ::TestTask . new ( :test ) do |t |
28
+ t . libs << 'test'
29
+ t . libs << 'lib'
30
+ t . test_files = FileList [ ENV [ 'TESTS' ] ? ENV [ 'TESTS' ] . split ( ',' ) : 'test/**/*_test.rb' ]
31
+ end
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ Gem::Specification.new do |s|
27
27
s . add_development_dependency 'rubocop' , '1.62.1'
28
28
s . add_development_dependency 'spec' , '~> 5.3' , '>= 5.3.4'
29
29
s . add_development_dependency 'yard' , '~> 0.9.11'
30
+ s . add_development_dependency 'minitest' , '~> 5.0'
31
+ s . add_development_dependency 'minitest-reporters' , '~> 1.1'
30
32
31
33
s . files = `git ls-files` . split ( "\n " ) . reject { |v | v . match ( /\A ^(ios_tests|android_tests|grid|test_apps)\/ .+/ ) }
32
34
end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'minitest/autorun'
16
+ require 'minitest/reporters'
17
+ require 'minitest'
18
+
19
+ begin
20
+ Minitest ::Reporters . use! [ Minitest ::Reporters ::ProgressReporter . new ]
21
+ rescue Errno ::ENOENT
22
+ # Ignore since Minitest::Reporters::JUnitReporter.new fails in deleting files, sometimes
23
+ end
24
+
25
+ class SampleTest < Minitest ::Test
26
+ def test_test
27
+ assert ( true )
28
+ end
29
+ end
You can’t perform that action at this time.
0 commit comments