Class: MarkdownExec::TestCollectUniqueNames
- Defined in:
- lib/mdoc.rb
Instance Method Summary collapse
- #setup ⇒ Object
- #test_empty_hash ⇒ Object
- #test_multiple_keys ⇒ Object
- #test_no_unique_names ⇒ Object
- #test_single_key ⇒ Object
Instance Method Details
#setup ⇒ Object
654 655 656 |
# File 'lib/mdoc.rb', line 654 def setup @mdoc = MDoc.new end |
#test_empty_hash ⇒ Object
658 659 660 |
# File 'lib/mdoc.rb', line 658 def test_empty_hash assert_empty @mdoc.collect_unique_names({}) end |
#test_multiple_keys ⇒ Object
667 668 669 670 |
# File 'lib/mdoc.rb', line 667 def test_multiple_keys input = { group1: %w[Alice Bob], group2: %w[Charlie Alice] } assert_equal %w[Alice Bob Charlie], @mdoc.collect_unique_names(input) end |
#test_no_unique_names ⇒ Object
672 673 674 675 |
# File 'lib/mdoc.rb', line 672 def test_no_unique_names input = { group1: ['Alice'], group2: ['Alice'] } assert_equal ['Alice'], @mdoc.collect_unique_names(input) end |
#test_single_key ⇒ Object
662 663 664 665 |
# File 'lib/mdoc.rb', line 662 def test_single_key input = { group1: %w[Alice Bob Charlie] } assert_equal %w[Alice Bob Charlie], @mdoc.collect_unique_names(input) end |