Sha256: ae752dadd036c690b5802ee6cfe358f450ae3a0eab4f7deef23d57b152eb4228
Contents?: true
Size: 918 Bytes
Versions: 1
Compression:
Stored size: 918 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 DeviceError < StandardError; end class Input attr_accessor :device_id def initialize(device_id) self.device_id = device_id end end class Output attr_accessor :device_id def initialize(device_id) self.device_id = device_id 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
launchpad-0.1.0 | test/helper.rb |