Skip to content

Commit c3fc2d3

Browse files
committed
Test Runner: Updates for in test files
1 parent 6da9783 commit c3fc2d3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spec/yaml-test-runner/runner.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
yaml = YAML.load_stream(File.read(test_file))
4545

4646
# Create the test object:
47+
requires = yaml.map.with_index { |a, i| yaml.delete_at(i) if a.keys.first == 'requires' }.compact
4748
setup = yaml.map.with_index { |a, i| yaml.delete_at(i) if a.keys.first == 'setup' }.compact.first&.[]('setup')
4849
teardown = yaml.map.with_index { |a, i| yaml.delete_at(i) if a.keys.first == 'teardown' }.compact.first
4950

@@ -62,8 +63,6 @@
6263
LOGGER.debug e
6364
end
6465

65-
puts "--- 🧪 Tests: #{@tests_count} | Passed: #{@tests_count - @errors.count} | Failed: #{@errors.count}"
66-
puts "--- ⏲ Elapsed time: #{Time.at(Time.now - starttime).utc.strftime("%H:%M:%S")}"
6766
unless @errors.empty?
6867
puts "+++ ❌ Errors/Failures: #{@errors.count}"
6968
@errors.map do |error|
@@ -73,3 +72,5 @@
7372
end
7473
exit 1
7574
end
75+
puts "--- 🧪 Tests: #{@tests_count} | Passed: #{@tests_count - @errors.count} | Failed: #{@errors.count}"
76+
puts "--- ⏲ Elapsed time: #{Time.at(Time.now - starttime).utc.strftime("%H:%M:%S")}"

0 commit comments

Comments
 (0)