Skip to content

Commit e89e4b4

Browse files
authored
chore(toys): Unflake yardoc test by ensuring the bundle is installed first (#462)
1 parent 56ebcd9 commit e89e4b4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

toys/.toys/.toys.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ def run_with_copy_core_docs
6161
include :terminal
6262

6363
def run
64+
::Dir.chdir(context_directory)
65+
puts "Ensuring the bundle is installed..." # So it doesn't interfere with yardoc output
66+
unless exec(["bundle", "check"], e: false).success?
67+
exec(["bundle", "install"])
68+
end
6469
puts "Running yardoc on unoptimized input..."
6570
unoptimized_result = exec_separate_tool(["yardoc", "--no-optimize"], out: [:tee, :inherit, :capture])
6671
puts "Running yardoc on optimized input..."
6772
optimized_result = exec_separate_tool(["yardoc", "--optimize"], out: [:tee, :inherit, :capture])
6873
unless unoptimized_result.captured_out == optimized_result.captured_out
6974
puts "Output changed!", :red
70-
puts "**** UNOPTIMIZED:", :red
71-
puts unoptimized_result.captured_out
72-
puts "**** OPTIMIZED:", :red
73-
puts optimized_result.captured_out
74-
puts "****", :red
7575
exit 1
7676
end
7777
if unoptimized_result.captured_out.empty? || optimized_result.captured_out.empty?

0 commit comments

Comments
 (0)