diff --git a/lib/faker/music.rb b/lib/faker/music.rb index 4a3ca0157b..ec442f9a26 100644 --- a/lib/faker/music.rb +++ b/lib/faker/music.rb @@ -21,6 +21,10 @@ def key_variants ['b', '#', ''] end + def key_types + ['', 'm'] + end + def chord_types ['', 'maj', '6', 'maj7', 'm', 'm7', '-7', '7', 'dom7', 'dim', 'dim7', 'm7b5'] end diff --git a/test/test_faker_music.rb b/test/test_faker_music.rb index 1bc0955e2c..12ab72d7d6 100644 --- a/test/test_faker_music.rb +++ b/test/test_faker_music.rb @@ -20,6 +20,13 @@ def test_key_variants end end + def test_key_types + assert @tester.key_types.size == 2 + @tester.key_types.each do |key_type| + assert !key_type.nil? + end + end + def test_chord_types assert @tester.chord_types.size == 12 @tester.chord_types.each do |chord_type| @@ -28,7 +35,7 @@ def test_chord_types end def test_key - assert @tester.name.match(/([A-Z])+(b|#){0,1}/) + assert @tester.name.match(/([A-Z])+(b|#){0,1}+(m){0,1}/) end def test_instrument