Skip to content

Commit 5169b9d

Browse files
Merge pull request #78 from hanneskaeufler/hk-fix-failing-spec
Force enable colored output
2 parents d257b77 + a077855 commit 5169b9d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/mutation/isolated_mutation_spec.cr

+8
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ module Crytic::Mutation
7878
"./fixtures/simple/bar.cr",
7979
["./fixtures/simple/bar_spec.cr"])))
8080

81+
# When running this spec as part of crytic, we have to
82+
# explicitly enable the colorization because otherwise
83+
# it is evaluated that the spec isn't run from a tty
84+
# and doesn't support coloring. This is the case
85+
# since crystal 0.32.0 by the following change:
86+
# https://github.com/crystal-lang/crystal/pull/8271/files#diff-0c497e87ce156eb81914a478f8564cc2R81
87+
Colorize.enabled = true
88+
8189
mutation.run.diff.should eq <<-DIFF
8290
@@ -1,5 +1,5 @@\n def bar\n\e[31m-\e[0m\e[31m if true\e[0m\n\e[32m+\e[0m\e[32m if false\e[0m\n 2\n else\n 3\n
8391
DIFF

0 commit comments

Comments
 (0)