Sha256: 6f484428e97072215b3dd7e322e3638459cc99a0be8d22a3f2dd2975347e73d6
Contents?: true
Size: 429 Bytes
Versions: 9
Compression:
Stored size: 429 Bytes
Contents
require_relative 'helper' class TestMatchWithReg < Test::Unit::TestCase include ARProxyTest def test_with_parts @ar.add_rule %r(http://books.cc/(.*)/(.*)) do |uri, cat, page| "cat: #{cat}; page: #{page}" end @req.start('books.cc') do |http| http.request_get('/books/1') do |res| assert_equal 'cat: books; page: 1', res.body assert_equal "200", res.code end end end end
Version data entries
9 entries across 9 versions & 1 rubygems