File: test-message.rb

package info (click to toggle)
libwebapp-ruby 0.4-2.1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 240 kB
  • sloc: ruby: 2,245; makefile: 79
file content (13 lines) | stat: -rw-r--r-- 271 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'test/unit'
require 'webapp'

class MessageTest < Test::Unit::TestCase
  def test_header_dup
    h1 = WebApp::Header.new
    h1.add 'foo', 'bar'
    h2 = h1.dup
    h1.add 'baz', 'qux'
    assert_equal('qux', h1['baz'])
    assert_equal(nil, h2['baz'])
  end
end