~ubuntu-branches/ubuntu/quantal/ruby-ferret/quantal

« back to all changes in this revision

Viewing changes to .pc/fix_compatibility_with_minitest.patch/test/unit/tc_field_symbol.rb

  • Committer: Package Import Robot
  • Author(s): Cédric Boutillier
  • Date: 2012-06-14 23:04:48 UTC
  • mfrom: (2.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20120614230448-wd5se4ia1yz7dvms
Tags: 0.11.8.4+debian-1
* New upstream version from a new source
  + the new code fixes format security issues (Closes: #672069)
  + change homepage to https://github.com/jkraemer/ferret/
* Build for all Ruby versions (Closes: #655636)
  + change depends accordingly
  + do not set shebang of bin/ferret to ruby1.8
* Repack source to remove convenience copy of bzlib
  + build-dep on libbz2-dev
  + dversionmangle in debian/watch
  + add debian/README.source explaining how to clean the source
* debian/patches:
  + disable_load_path_manipulation.patch: do not override $LOAD_PATH
  + disable_test_causing_segfault.patch: temporarily disable a test known to
    cause segfaults
  + fix_compatibility_with_minitest.patch: fix a failing test with Ruby1.9
  + use_system_bzlib.patch: adapt the source to use system libbz2
  + fix_typos_in_source_code.patch: correct some spelling errors in the
    source code
  + block_variables_have_local_scopes.patch: fix syntax in
    bin/ferret-browser
* Override dh_auto_clean to remove test/temp when cleaning
* Bump Standards-Version to 3.9.3 (no changes needed)
* Set priority of transitional packages to extra
* Add myself to Uploaders:
* Update copyright to DEP-5 copyright-format/1.0
* Add TUTORIAL and debian/README.source to documents
* Override lintian warnings about duplicate descriptions of transitional
  packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require File.dirname(__FILE__) + "/../test_helper"
 
2
 
 
3
class FieldSymbolTest < Test::Unit::TestCase
 
4
  def test_field_symbol
 
5
    Ferret::FIELD_TYPES.each do |field_type|
 
6
      assert(:sym.respond_to?(field_type),
 
7
             "Symbol doesn't respond to #{field_type}")
 
8
    end
 
9
 
 
10
    %w(desc desc? type).each do  |method|
 
11
      assert(:sym.respond_to?(method),
 
12
             "Symbol doesn't respond to #{method}")
 
13
    end
 
14
 
 
15
    assert_nil(:sym.type)
 
16
    assert(!:sym.desc?)
 
17
    assert(:sym.desc.desc?)
 
18
    assert(!:sym.desc.desc.desc?)
 
19
 
 
20
    Ferret::FIELD_TYPES.each do |field_type|
 
21
      assert_equal(field_type, :sym.__send__(field_type).type)
 
22
    end
 
23
 
 
24
    assert(:string, :sym.integer.byte.float.string.type)
 
25
  end
 
26
end