diff options
Diffstat (limited to 'test/csv/test_patterns.rb')
| -rw-r--r-- | test/csv/test_patterns.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/test/csv/test_patterns.rb b/test/csv/test_patterns.rb deleted file mode 100644 index 881f03a3a4..0000000000 --- a/test/csv/test_patterns.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -require_relative "helper" - -class TestCSVPatternMatching < Test::Unit::TestCase - - def test_hash - case CSV::Row.new(%i{A B C}, [1, 2, 3]) - in B: b, C: c - assert_equal([2, 3], [b, c]) - end - end - - def test_hash_rest - case CSV::Row.new(%i{A B C}, [1, 2, 3]) - in B: b, **rest - assert_equal([2, { A: 1, C: 3 }], [b, rest]) - end - end - - def test_array - case CSV::Row.new(%i{A B C}, [1, 2, 3]) - in *, matched - assert_equal(3, matched) - end - end -end |
