Skip to content

Commit

Permalink
Restore $KCODE setting for multibyte support that rspec used to do
Browse files Browse the repository at this point in the history
(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
hipe committed Dec 15, 2010
1 parent d9f5cdb commit bc554fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -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

Expand Down

0 comments on commit bc554fd

Please sign in to comment.