diff options
Diffstat (limited to 'test/psych/visitors/test_yaml_tree.rb')
-rw-r--r-- | test/psych/visitors/test_yaml_tree.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/psych/visitors/test_yaml_tree.rb b/test/psych/visitors/test_yaml_tree.rb index 6a9dbc1ec3..01e685134a 100644 --- a/test/psych/visitors/test_yaml_tree.rb +++ b/test/psych/visitors/test_yaml_tree.rb @@ -1,5 +1,6 @@ # frozen_string_literal: true require 'psych/helper' +require 'delegate' module Psych module Visitors @@ -33,7 +34,7 @@ module Psych v << "hello world" v.finish - assert_match "hello world", io.string + assert_include io.string, "hello world" end def test_binary_formatting @@ -166,9 +167,9 @@ module Psych end def test_string - assert_match(/'017'/, Psych.dump({'a' => '017'})) - assert_match(/'019'/, Psych.dump({'a' => '019'})) - assert_match(/'01818'/, Psych.dump({'a' => '01818'})) + assert_include(Psych.dump({'a' => '017'}), "'017'") + assert_include(Psych.dump({'a' => '019'}), "'019'") + assert_include(Psych.dump({'a' => '01818'}), "'01818'") end # http://yaml.org/type/null.html |