Skip to content

Commit

Permalink
refactor: test method to use Console.info and system() instead of Ope…
Browse files Browse the repository at this point in the history
…n3.capture3
  • Loading branch information
aristotelesbr committed Jan 3, 2024
1 parent 99a608f commit ab6a0c9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bake/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Released under the MIT License.
# Copyright, 2023, by Aristóteles Coutinho.

require 'open3'

# Run tests.
#
# @parameter test [String] the path to file
Expand All @@ -14,7 +12,6 @@ def test(test: nil)
all_tests_command = "Dir.glob(\"./#{test_dir}/**/test_*.rb\").each { require _1 }"
test_command = test ? "ruby -I#{test_dir} #{test}" : "ruby -I#{test_dir} -e '#{all_tests_command}'"

stdout, _stderr, _status = ::Open3.capture3(test_command)

puts "Output padrão:\n#{stdout}"
Console.info('Running tests...')
system(test_command)
end

0 comments on commit ab6a0c9

Please sign in to comment.