@@ -14,7 +14,7 @@ def test_naming_scale
14
14
def test_chromatic_scale
15
15
skip
16
16
chromatic = Scale . new ( 'C' , :chromatic )
17
- expected = [ 'C' , 'C#' , 'D' , 'D#' , 'E' , 'F' , 'F#' , 'G' , 'G#' , 'A' , 'A#' , 'B' ]
17
+ expected = %w( C C# D D# E F F# G G# A A# B )
18
18
actual = chromatic . pitches
19
19
assert_equal expected , actual
20
20
end
@@ -46,15 +46,15 @@ def test_major_scale
46
46
def test_another_major_scale
47
47
skip
48
48
major = Scale . new ( 'G' , :major , 'MMmMMMm' )
49
- expected = [ 'G' , 'A' , 'B' , 'C' , 'D' , 'E' , 'F#' ]
49
+ expected = %w( G A B C D E F# )
50
50
actual = major . pitches
51
51
assert_equal expected , actual
52
52
end
53
53
54
54
def test_minor_scale
55
55
skip
56
56
minor = Scale . new ( 'f#' , :minor , 'MmMMmMM' )
57
- expected = [ 'F#' , 'G#' , 'A' , 'B' , 'C#' , 'D' , 'E' ]
57
+ expected = %w( F# G# A B C# D E )
58
58
actual = minor . pitches
59
59
assert_equal expected , actual
60
60
end
@@ -86,7 +86,7 @@ def test_mixolydian_mode
86
86
def test_lydian_mode
87
87
skip
88
88
lydian = Scale . new ( 'a' , :lydian , 'MMMmMMm' )
89
- expected = [ 'A' , 'B' , 'C#' , 'D#' , 'E' , 'F#' , 'G#' ]
89
+ expected = %w( A B C# D# E F# G# )
90
90
actual = lydian . pitches
91
91
assert_equal expected , actual
92
92
end
@@ -109,7 +109,7 @@ def test_locrian_mode
109
109
110
110
def test_harmonic_minor
111
111
skip
112
- harmonic_minor = Scale . new ( 'd' , ' harmonic_minor' , 'MmMMmAm' )
112
+ harmonic_minor = Scale . new ( 'd' , : harmonic_minor, 'MmMMmAm' )
113
113
expected = %w( D E F G A Bb Db )
114
114
actual = harmonic_minor . pitches
115
115
assert_equal expected , actual
@@ -118,7 +118,7 @@ def test_harmonic_minor
118
118
def test_octatonic
119
119
skip
120
120
octatonic = Scale . new ( 'C' , :octatonic , 'MmMmMmMm' )
121
- expected = [ 'C' , 'D' , 'D#' , 'F' , 'F#' , 'G#' , 'A' , 'B' ]
121
+ expected = %w( C D D# F F# G# A B )
122
122
actual = octatonic . pitches
123
123
assert_equal expected , actual
124
124
end
@@ -134,16 +134,38 @@ def test_hexatonic
134
134
def test_pentatonic
135
135
skip
136
136
pentatonic = Scale . new ( 'A' , :pentatonic , 'MMAMA' )
137
- expected = [ 'A' , 'B' , 'C#' , 'E' , 'F#' ]
137
+ expected = %w( A B C# E F# )
138
138
actual = pentatonic . pitches
139
139
assert_equal expected , actual
140
140
end
141
141
142
142
def test_enigmatic
143
143
skip
144
144
enigmatic = Scale . new ( 'G' , :enigma , 'mAMMMmM' )
145
- expected = [ 'G' , 'G#' , 'B' , 'C#' , 'D#' , 'F' , 'F#' ]
145
+ expected = %w( G G# B C# D# F F# )
146
146
actual = enigmatic . pitches
147
147
assert_equal expected , actual
148
148
end
149
+
150
+ # Problems in exercism evolve over time, as we find better ways to ask
151
+ # questions.
152
+ # The version number refers to the version of the problem you solved,
153
+ # not your solution.
154
+ #
155
+ # Define a constant named VERSION inside of the top level BookKeeping
156
+ # module, which may be placed near the end of your file.
157
+ #
158
+ # In your file, it will look like this:
159
+ #
160
+ # module BookKeeping
161
+ # VERSION = 1 # Where the version number matches the one in the test.
162
+ # end
163
+ #
164
+ # If you are curious, read more about constants on RubyDoc:
165
+ # http://ruby-doc.org/docs/ruby-doc-bundle/UsersGuide/rg/constants.html
166
+
167
+ def test_bookkeeping
168
+ skip
169
+ assert_equal 1 , BookKeeping ::VERSION
170
+ end
149
171
end
0 commit comments