Sha256: 78d49a506e32e92b8d2aa1a5c66dc9aabe415502a1f2336f7805cdae4a95d532

Contents?: true

Size: 566 Bytes

Versions: 7

Compression:

Stored size: 566 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "helper"))

class VerbsTest < Test::Unit::TestCase
  def setup
    @agent = WWW::Mechanize.new
  end

  def test_put
    page = @agent.put('http://localhost/verb', { 'q' => 'foo' })
    assert_equal('method: PUT', page.body)
  end

  def test_delete
    page = @agent.delete('http://localhost/verb', { 'q' => 'foo' })
    assert_equal('method: DELETE', page.body)
  end

  def test_head
    page = @agent.head('http://localhost/verb', { 'q' => 'foo' })
    assert_equal('method: HEAD', page.body)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
mechanize-0.8.0 test/test_verbs.rb
mechanize-0.8.1 test/test_verbs.rb
mechanize-0.8.2 test/test_verbs.rb
mechanize-0.8.4 test/test_verbs.rb
mechanize-0.8.3 test/test_verbs.rb
mechanize-0.9.0 test/test_verbs.rb
mechanize-0.8.5 test/test_verbs.rb