Permalink
Browse files

Run against all rubies on travis.

For some reason, I got a weird error on travis when running against 1.9.2 for HTTPClient, where the response was already the body string rather than an object that responds to #content.  This fixes that as well.
  • Loading branch information...
1 parent 48ea1e7 commit 550eb66bfe702f64fa5ac5a3db129ac6b18f1340 @myronmarston committed May 16, 2011
Showing with 9 additions and 3 deletions.
  1. +7 −1 .travis.yml
  2. +0 −1 features/test_frameworks/test_unit.feature
  3. +2 −1 spec/support/http_library_adapters.rb
View
@@ -1,5 +1,11 @@
-script: "rake ci:build"
+script: "bundle exec rake ci:build"
rvm:
+ - 1.8.6
+ - 1.8.7
+ - 1.9.1
- 1.9.2
+ - ree
+ - jruby
+ - rbx
env:
- CI=true
@@ -1,4 +1,3 @@
-@ci @announce
Feature: Usage with Test::Unit
To use VCR with Test::Unit, wrap the body of any test method in
@@ -40,7 +40,8 @@ def make_http_request(method, url, body = nil, headers = {})
def self.http_library_name; 'HTTP Client'; end
def get_body_string(response)
- string = response.body.content
+ body = response.body
+ string = body.is_a?(String) ? body : body.content
string.respond_to?(:read) ? string.read : string
end

0 comments on commit 550eb66

Please sign in to comment.