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

Version Path
mechanize-2.7.7 test/test_mechanize_file_connection.rb
husc-0.2.1 vendor/bundle/gems/mechanize-2.7.6/test/test_mechanize_file_connection.rb
husc-0.2.0 vendor/bundle/gems/mechanize-2.7.6/test/test_mechanize_file_connection.rb
husc-0.1.1 vendor/bundle/gems/mechanize-2.7.6/test/test_mechanize_file_connection.rb
husc-0.1.0 vendor/bundle/gems/mechanize-2.7.6/test/test_mechanize_file_connection.rb
mechanize-2.7.6 test/test_mechanize_file_connection.rb
mechanize-2.7.5 test/test_mechanize_file_connection.rb
mechanize-2.7.4 test/test_mechanize_file_connection.rb
mechanize-2.7.3 test/test_mechanize_file_connection.rb
mechanize-2.7.2 test/test_mechanize_file_connection.rb
mechanize-2.7.1 test/test_mechanize_file_connection.rb
mechanize-2.7.0 test/test_mechanize_file_connection.rb
mechanize-2.6.0 test/test_mechanize_file_connection.rb
mechanize-2.5.1 test/test_mechanize_file_connection.rb
mechanize-2.5 test/test_mechanize_file_connection.rb
mechanize-2.4 test/test_mechanize_file_connection.rb
frameworks-capybara-0.2.0.rc6 vendor/bundle/ruby/1.8/gems/mechanize-2.3/test/test_mechanize_file_connection.rb
frameworks-capybara-0.2.0.rc5 vendor/bundle/ruby/1.8/gems/mechanize-2.3/test/test_mechanize_file_connection.rb
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/mechanize-2.3/test/test_mechanize_file_connection.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/mechanize-2.3/test/test_mechanize_file_connection.rb