Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 4e6024b8e6
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 30 lines (25 sloc) 0.783 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/usr/bin/env ruby
#
# Contains the specifications for the MIDIator::Driver class.
#
# == Authors
#
# * Ben Bleything <ben@bleything.net>
#
# == Copyright
#
# Copyright (c) 2008 Ben Bleything
#
# This code released under the terms of the MIT license.
#

require File.join( File.dirname(__FILE__), 'lib', 'spec_helper.rb' )

describe MIDIator::Driver do
  it "automatically registers subclasses" do
    SomeCoolDriver = Class.new
    SomeCoolDriver.should_receive( :< ).with( MIDIator::Driver ).and_return( true )

    # call inherited directly since we can't set up expectations ahead of
    # time with Class.new( MIDIator::Driver )
    MIDIator::Driver.inherited( SomeCoolDriver )

    MIDIator::DriverRegistry.instance[ "some_cool_driver" ].should be( SomeCoolDriver )
  end
end
Something went wrong with that request. Please try again.