mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_gem_specification.rb: skip meaningless tests
* test/rubygems/test_gem_specification.rb (have_syck): skip tests which are meaningless if syck is never possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9dd9041fcf
commit
68e47b6122
1 changed files with 14 additions and 0 deletions
|
@ -117,6 +117,7 @@ end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_self_from_yaml_syck_date_bug
|
def test_self_from_yaml_syck_date_bug
|
||||||
|
return unless have_syck # No meanings if no syck
|
||||||
# This is equivalent to (and totally valid) psych 1.0 output and
|
# This is equivalent to (and totally valid) psych 1.0 output and
|
||||||
# causes parse errors on syck.
|
# causes parse errors on syck.
|
||||||
yaml = @a1.to_yaml
|
yaml = @a1.to_yaml
|
||||||
|
@ -131,6 +132,7 @@ end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_self_from_yaml_syck_default_key_bug
|
def test_self_from_yaml_syck_default_key_bug
|
||||||
|
return unless have_syck # No meanings if no syck
|
||||||
# This is equivalent to (and totally valid) psych 1.0 output and
|
# This is equivalent to (and totally valid) psych 1.0 output and
|
||||||
# causes parse errors on syck.
|
# causes parse errors on syck.
|
||||||
yaml = <<-YAML
|
yaml = <<-YAML
|
||||||
|
@ -1729,4 +1731,16 @@ end
|
||||||
ensure
|
ensure
|
||||||
$VERBOSE = old_verbose
|
$VERBOSE = old_verbose
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def have_syck
|
||||||
|
unless defined?(@@have_syck)
|
||||||
|
begin
|
||||||
|
old_verbose, $VERBOSE = $VERBOSE, nil
|
||||||
|
@@have_syck = with_syck {YAML::ENGINE.syck?}
|
||||||
|
ensure
|
||||||
|
$VERBOSE = old_verbose
|
||||||
|
end
|
||||||
|
end
|
||||||
|
@@have_syck
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue