Skip to content

Commit

Permalink
Force encoding to UTF-8
Browse files Browse the repository at this point in the history
Ref #693
  • Loading branch information
mattwynne committed Mar 18, 2015
1 parent 49eeaa1 commit 64e90e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/cucumber.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'yaml'
require 'cucumber/encoding'
require 'cucumber/platform'
require 'cucumber/runtime'
require 'cucumber/cli/main'
Expand Down
5 changes: 5 additions & 0 deletions lib/cucumber/encoding.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# See https://github.com/cucumber/cucumber/issues/693
if defined? Encoding
Encoding.default_external = 'utf-8'
Encoding.default_internal = 'utf-8'
end
5 changes: 1 addition & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
$:.unshift(File.dirname(__FILE__))

# For Travis....
if defined? Encoding
Encoding.default_external = 'utf-8'
Encoding.default_internal = 'utf-8'
end
require 'cucumber/encoding'

load File.expand_path(File.dirname(__FILE__) + '/../spec/simplecov_setup.rb')

Expand Down

0 comments on commit 64e90e1

Please sign in to comment.