test/test_string.rb in ffaker-2.11.0 vs test/test_string.rb in ffaker-2.12.0

- old
+ new

@@ -1,6 +1,6 @@ -# encoding: utf-8 +# frozen_string_literal: true require 'helper' class TestString < Test::Unit::TestCase include DeterministicHelper @@ -41,21 +41,21 @@ assert_match(/\A\s\s\s\z/, FS.from_regexp(/\s\s\s/)) assert_deterministic { FS.from_regexp(/\s\s\s/) } end def test_escaped_characters - assert_equal '\\/.()[]{}', FS.from_regexp(/\\\/\.\(\)\[\]\{\}/) + assert_equal '\\/.()[]{}', FS.from_regexp(%r{\\/\.\(\)\[\]\{\}}) assert_deterministic { FS.from_regexp(%r|\\\/\.\(\)\[\]\{\}|) } end def test_atom_sets assert_include %w[a b c], FS.from_regexp(/[abc]/) assert_deterministic { FS.from_regexp(/[abc]/) } end def test_special_sets - assert_match(/\A[\w\d]\z/, FS.from_regexp(/[\w\d]/)) - assert_deterministic { FS.from_regexp(/[\w\d]/) } + assert_match(/\A[\s\d]\z/, FS.from_regexp(/[\s\d]/)) + assert_deterministic { FS.from_regexp(/[\s\d]/) } end def test_atom_question assert_match(/\Aa?\z/, FS.from_regexp(/a?/)) assert_deterministic { FS.from_regexp(/a?/) }