Skip to content

Commit

Permalink
next try to fix the encoding issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bitboxer committed Jun 8, 2011
1 parent a1242e9 commit 80584e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/mocks/rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def request(resource, method = "get", args = {}, sign_request=false)
if (!File.exists? file)
puts "Mock file not found : #{file}"
else
File.open(file,"r:UTF-8").read
File.read(file)
end

elsif @base_url == Rockstar::AUTH_URL
Expand Down
5 changes: 5 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
require File.expand_path('../../lib/rockstar', __FILE__)
require File.expand_path('..//mocks/rest', __FILE__)


if RUBY_VERSION > "1.9"
Encoding.default_internal = "UTF-8"
end

class << Test::Unit::TestCase
def test(name, &block)
test_name = :"test_#{name.gsub(' ','_')}"
Expand Down

0 comments on commit 80584e7

Please sign in to comment.