Skip to content

Commit ed641ab

Browse files
committed
Specify an explicit external encoding for tests.
This fixes a failure in the spec at spec/shell/basic_spec.rb:208 (Thor::Shell::Basic#print_table uses maximum terminal width) when running on a system with a default encoding that is not compatible with Unicode.
1 parent 62593e0 commit ed641ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

spec/helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
$0 = 'thor'
2828
$thor_runner = true
2929
ARGV.clear
30+
Encoding.default_external = Encoding::UTF_8 if RUBY_VERSION > '1.8.7'
3031
Thor::Base.shell = Thor::Shell::Basic
3132

3233
# Load fixtures

0 commit comments

Comments
 (0)