File: entities_test.rb

package info (click to toggle)
ruby-htmlentities 4.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 316 kB
  • sloc: ruby: 2,235; makefile: 3
file content (24 lines) | stat: -rw-r--r-- 508 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# encoding: UTF-8
require_relative "./test_helper"

class HTMLEntities::EntitiesTest < Test::Unit::TestCase

  def test_should_raise_exception_when_unknown_flavor_specified
    assert_raises HTMLEntities::UnknownFlavor do
      HTMLEntities.new('foo')
    end
  end

  def test_should_allow_symbol_for_flavor
    assert_nothing_raised do
      HTMLEntities.new(:xhtml1)
    end
  end

  def test_should_allow_upper_case_flavor
    assert_nothing_raised do
      HTMLEntities.new('XHTML1')
    end
  end

end