Skip to content

Commit

Permalink
Use omit instead of skip for test-unit
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jan 10, 2024
1 parent 88bbdd7 commit 83ce43e
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion test/test_rake_application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def test_load_rakefile_doesnt_print_rakefile_directory_from_subdir_if_silent
end

def test_load_rakefile_not_found
skip if jruby9?
omit if jruby9?

Dir.chdir @tempdir
ENV["RAKE_SYSTEM"] = "not_exist"
Expand Down
2 changes: 1 addition & 1 deletion test/test_rake_application_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def test_require
end

def test_missing_require
skip if jruby?
omit if jruby?

ex = assert_raises(LoadError) do
flags(["--require", "test/missing"]) do |opts|
Expand Down
2 changes: 1 addition & 1 deletion test/test_rake_backtrace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class TestRakeBacktrace < Rake::TestCase # :nodoc:
def setup
super

skip "tmpdir is suppressed in backtrace" if
omit "tmpdir is suppressed in backtrace" if
Rake::Backtrace::SUPPRESS_PATTERN =~ Dir.pwd
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_rake_clean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def create_undeletable_file
rescue
file_name
else
skip "Permission to delete files is different on this system"
omit "Permission to delete files is different on this system"
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_rake_cpu_counter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def setup

def test_count
num = @cpu_counter.count
skip "cannot count CPU" if num == nil
omit "cannot count CPU" if num == nil
assert_kind_of Numeric, num
assert_operator num, :>=, 1
end
Expand Down
10 changes: 5 additions & 5 deletions test/test_rake_file_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def test_sh_with_env
end

def test_sh_with_multiple_arguments
skip if jruby9? # https://github.com/jruby/jruby/issues/3653
omit if jruby9? # https://github.com/jruby/jruby/issues/3653

check_no_expansion
ENV["RAKE_TEST_SH"] = "someval"
Expand All @@ -182,7 +182,7 @@ def test_sh_with_multiple_arguments
end

def test_sh_with_spawn_options
skip "JRuby does not support spawn options" if jruby?
omit "JRuby does not support spawn options" if jruby?

echocommand

Expand All @@ -198,7 +198,7 @@ def test_sh_with_spawn_options
end

def test_sh_with_hash_option
skip "JRuby does not support spawn options" if jruby?
omit "JRuby does not support spawn options" if jruby?
check_expansion

verbose(false) {
Expand Down Expand Up @@ -243,7 +243,7 @@ def test_sh_noop
def test_sh_bad_option
# Skip on JRuby because option checking is performed by spawn via system
# now.
skip "JRuby does not support spawn options" if jruby?
omit "JRuby does not support spawn options" if jruby?

shellcommand

Expand Down Expand Up @@ -395,7 +395,7 @@ def assert_echoes_fully
end

def test_ruby_with_multiple_arguments
skip if jruby9? # https://github.com/jruby/jruby/issues/3653
omit if jruby9? # https://github.com/jruby/jruby/issues/3653

check_no_expansion

Expand Down
10 changes: 5 additions & 5 deletions test/test_rake_functional.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def test_by_default_rakelib_files_are_included
end

def test_implicit_system
skip if jruby9?
omit if jruby9?

rake_system_dir
Dir.chdir @tempdir
Expand Down Expand Up @@ -470,7 +470,7 @@ def test_correct_number_of_tasks_reported
end

def test_file_list_is_requirable_separately
skip if jruby9? # https://github.com/jruby/jruby/issues/3655
omit if jruby9? # https://github.com/jruby/jruby/issues/3655

ruby "-rrake/file_list", "-e", 'puts Rake::FileList["a"].size'
assert_equal "1\n", @out
Expand All @@ -496,12 +496,12 @@ def test_signal_propagation_in_tests
assert_match(/ATEST/, @out)
refute_match(/BTEST/, @out)
else
skip "Signal detect seems broken on this system"
omit "Signal detect seems broken on this system"
end
end

def test_failing_test_sets_exit_status
skip if uncertain_exit_status?
omit if uncertain_exit_status?
rakefile_failing_test_task
rake
assert @exit.exitstatus > 0, "should be non-zero"
Expand All @@ -520,7 +520,7 @@ def test_stand_alone_filelist

# We are unable to accurately verify that Rake returns a proper
# error exit status using popen3 in Ruby 1.8.7 and JRuby. This
# predicate function can be used to skip tests or assertions as
# predicate function can be used to omit tests or assertions as
# needed.
def uncertain_exit_status?
defined?(JRUBY_VERSION)
Expand Down
2 changes: 1 addition & 1 deletion test/test_rake_task_with_arguments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_actions_of_various_arity_are_ok_with_args

def test_actions_adore_keywords
# https://github.com/ruby/rake/pull/174#issuecomment-263460761
skip if jruby9?
omit if jruby9?
eval <<-RUBY, binding, __FILE__, __LINE__+1
notes = []
t = task :t, [:reqr, :ovrd, :dflt] # required, overridden-optional, default-optional
Expand Down

0 comments on commit 83ce43e

Please sign in to comment.