~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to test/psych/test_yaml.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#                                                                                               vim:sw=4:ts=4
3
3
# $Id$
4
4
#
5
 
require_relative 'helper'
 
5
require 'psych/helper'
 
6
require 'ostruct'
6
7
 
7
8
# [ruby-core:01946]
8
9
module Psych_Tests
14
15
        Psych.domain_types.clear
15
16
    end
16
17
 
 
18
    def test_y_method
 
19
      assert_raises(NoMethodError) do
 
20
        OpenStruct.new.y 1
 
21
      end
 
22
    end
 
23
 
 
24
    def test_syck_compat
 
25
      time = Time.utc(2010, 10, 10)
 
26
      yaml = Psych.dump time
 
27
      assert_match "2010-10-10 00:00:00.000000000 Z", yaml
 
28
    end
 
29
 
17
30
    # [ruby-core:34969]
18
31
    def test_regexp_with_n
19
32
        assert_cycle(Regexp.new('',0,'n'))