Skip to content

Commit

Permalink
skip (pend) mock test if require "test-unit-rr" fails
Browse files Browse the repository at this point in the history
  • Loading branch information
hasumikin committed Nov 9, 2023
1 parent 49168c8 commit 539fe0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/reline/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@

require 'reline'
require 'test/unit'
require 'test/unit/rr'

begin
unless ENV['TEST_UNIT_RR'] == 'no'
require 'test/unit/rr'
ENV['TEST_UNIT_RR'] = 'yes'
end
rescue LoadError
ENV['TEST_UNIT_RR'] = 'no'
end

begin
require 'rbconfig'
Expand Down
1 change: 1 addition & 0 deletions test/reline/test_face.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ def test_invalid_rgb?
end

def test_define_method_proxies_the_order_of_arguments
pend "skip because test-unit-rr could not be loaded" if ENV['TEST_UNIT_RR'] == 'no'
mock(@config).format_to_sgr(
[[:foreground, :blue], [:style, [:bold, :italicized]], [:background, :red]]
)
Expand Down

0 comments on commit 539fe0d

Please sign in to comment.