Sha256: e6c0aa8d9304211d6a26565c5c525dacadf3d8f290bc680cd7fe6fae69bd50c6
Contents?: true
Size: 392 Bytes
Versions: 31
Compression:
Stored size: 392 Bytes
Contents
require 'mechanize/test_case' class TestMechanizeFileConnection < Mechanize::TestCase def test_request uri = URI.parse "file://#{File.expand_path __FILE__}" conn = Mechanize::FileConnection.new body = '' conn.request uri, nil do |response| response.read_body do |part| body << part end end assert_equal File.read(__FILE__), body end end
Version data entries
31 entries across 31 versions & 5 rubygems