Sha256: 4033b4320e2463db1b491573dbdb612718671384a5cde73e5a75e8a4c790f704

Contents?: true

Size: 453 Bytes

Versions: 9

Compression:

Stored size: 453 Bytes

Contents

require_relative 'helper'

class TestRespondWithURL < Test::Unit::TestCase

  include ARProxyTest

  def test_respond_with_simple_file
    @ar.add_rule 'http://www.test.com/' => '=GOTO=> http://www.1688.com/crossdomain.xml'
    @req.start('www.test.com') do |http|
      http.request_get('/') do |res|
        open("http://www.1688.com/crossdomain.xml") do |file|
          assert_equal file.read, res.read_body
        end
      end
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
auto_response-0.2.0 test/respond_with_url_test.rb
auto_response-0.1.8 test/respond_with_url_test.rb
auto_response-0.1.6 test/respond_with_url_test.rb
auto_response-0.1.5 test/respond_with_url_test.rb
auto_response-0.1.4 test/respond_with_url_test.rb
auto_response-0.1.3 test/respond_with_url_test.rb
auto_response-0.1.2 test/respond_with_url_test.rb
auto_response-0.1.1 test/respond_with_url_test.rb
auto_response-0.1.0 test/respond_with_url_test.rb