Skip to content
Browse files

Restore $KCODE setting for multibyte support that rspec used to do

(3 examples, 0 failures) (Run filtered using {:multibyte=>true})

@todo 1.9 ?

rspec 1.3.1 used to set $KCODE='u' in one place which activated the
activesuport wrapper for multibyte chars when calling String#mb_chars
  • Loading branch information...
1 parent d9f5cdb commit bc554fde89e3dec301836789e45892ba5fb14518 @hipe hipe committed Dec 15, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 spec/spec_helper.rb
View
5 spec/spec_helper.rb
@@ -61,6 +61,11 @@ def parse(input, options = {})
def parse_multibyte(input, options = {})
require 'active_support/all'
+
+ if 'NONE' == $KCODE then $KCODE = 'UTF8' end
+ # rspec 1.3 used to do something similar (set it to 'u') that we need
+ # for activerecord multibyte wrapper to kick in (1.8 only? @todo)
+
parse(input.mb_chars, options)
end

0 comments on commit bc554fd

Please sign in to comment.
Something went wrong with that request. Please try again.