Class: TestNotes
- Defined in:
- lib/tests.rb
Instance Method Summary collapse
Instance Method Details
#test_inc ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/tests.rb', line 34 def test_inc Composer.scale = "major" n=Note.new(0,5) assert_equal([0, 2, 4, 5, 7, 9, 11], scale_notes) b=n.inc 2 assert_equal 4, b.note b=n.inc 7 assert_equal 0, b.note assert_equal 6, b.octave b=n.inc 0 assert_equal 0, b.note assert_equal 5, b.octave b=n.inc -2 assert_equal 9, b.note assert_equal 4, b.octave b=n.inc -9 assert_equal 9, b.note assert_equal 3, b.octave end |