Sha256: 4e175a77327b0e6d5463a618b5ef1d28013227629e6763626494e88ff8c2ac2c
Contents?: true
Size: 983 Bytes
Versions: 4
Compression:
Stored size: 983 Bytes
Contents
require 'rubygems' require 'test/unit' require 'shoulda' require 'mocha' begin require 'redgreen' if ENV['TM_FILENAME'].nil? rescue MissingSourceFile # ignore - just for colorization end $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'launchpad' class Test::Unit::TestCase end # mock Portmidi for tests module Portmidi class Input attr_accessor :device_id def initialize(device_id) self.device_id = device_id end def read(*args); nil; end def close; nil; end end class Output attr_accessor :device_id def initialize(device_id) self.device_id = device_id end def write(*args); nil; end def close; nil; end end def self.input_devices; mock_devices; end def self.output_devices; mock_devices; end def self.start; end end def mock_devices(opts = {}) [Portmidi::Device.new(opts[:id] || 1, 0, 0, opts[:name] || 'Launchpad')] end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
launchpad-0.2.2 | test/helper.rb |
launchpad-0.2.1 | test/helper.rb |
launchpad-0.2.0 | test/helper.rb |
launchpad-0.1.1 | test/helper.rb |