test/test_beeps.rb in beeps-0.1.32 vs test/test_beeps.rb in beeps-0.1.33
- old
+ new
@@ -1,18 +1,21 @@
# -*- coding: utf-8 -*-
-$BEEPS_NOAUTOINIT = true
-
require_relative 'helper'
class TestBeeps < Test::Unit::TestCase
- def test_init!()
- assert_raise(Beeps::BeepsError) {Beeps.fin!}
- assert Beeps.init!
- assert_raise(Beeps::BeepsError) {Beeps.init!}
- assert Beeps.fin!
+ B = Beeps
+
+ def test_beep()
+ B.beep_processor = B::Oscillator.new >> B::Gain.new(gain: 0)
+ assert_nothing_raised {B.be}
+ assert_nothing_raised {B.bee}
+ assert_nothing_raised {B.beep}
+ assert_nothing_raised {B.beeep}
+ assert_nothing_raised {B.beeeep}
+ assert_nothing_raised {B.beeeeep}
end
end# TestBeeps