Skip to content

Commit

Permalink
Fix tests to account for "JRuby limited openssl loaded" warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisk committed Mar 6, 2011
1 parent 5208a44 commit 27d0552
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/test_other_net_http_libraries.rb
Expand Up @@ -8,7 +8,12 @@ def capture_output_from_requiring(libs, additional_code = "")
vendor_dirs = Dir["#{File.dirname(__FILE__)}/vendor/*/lib"]
load_path_opts = vendor_dirs.unshift(fakeweb_dir).map { |dir| "-I#{dir}" }.join(" ")

`#{ruby_path} #{load_path_opts} -e "#{requires}; #{additional_code}" 2>&1`
output = `#{ruby_path} #{load_path_opts} -e "#{requires}; #{additional_code}" 2>&1`
remove_jruby_openssl_warnings(output)
end

def remove_jruby_openssl_warnings(string)
string.lines.reject { |line| line =~ /jruby.*openssl/i }.join
end

def test_requiring_samuel_before_fakeweb_prints_warning
Expand Down

0 comments on commit 27d0552

Please sign in to comment.