-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new selectors (with open), coremidi api changes, version
- Loading branch information
Showing
13 changed files
with
139 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
|
||
module UniMIDI | ||
|
||
VERSION = "0.2.2" | ||
VERSION = "0.2.3" | ||
|
||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'helper' | ||
|
||
class SelectorTest < Test::Unit::TestCase | ||
|
||
include UniMIDI | ||
include TestHelper | ||
|
||
def test_first | ||
i = Input.first | ||
assert_equal(Input.all.first, i) | ||
end | ||
|
||
def test_last | ||
i = Input.last | ||
assert_equal(Input.all.last, i) | ||
end | ||
|
||
def test_first_with_block | ||
sleep(1) | ||
i = Input.first do |i| | ||
assert_equal(true, i.enabled?) | ||
end | ||
assert_equal(Input.all.first, i) | ||
end | ||
|
||
def test_last_with_block | ||
sleep(1) | ||
i = Input.last do |i| | ||
assert_equal(true, i.enabled?) | ||
end | ||
assert_equal(Input.all.last, i) | ||
end | ||
|
||
def test_brackets | ||
i = Input[0] | ||
assert_equal(Input.first, i) | ||
assert_equal(Input.all.first, i) | ||
end | ||
|
||
def test_use_with_block | ||
sleep(1) | ||
i = Input.use(0) do |i| | ||
assert_equal(true, i.enabled?) | ||
end | ||
assert_equal(Input.first, i) | ||
assert_equal(Input.all.first, i) | ||
end | ||
|
||
def test_all | ||
i = Input.all | ||
assert_equal(Device.all_by_type[:input], Input.all) | ||
end | ||
|
||
end |