class IntegrationMatcherTest
Public Class Methods
available?()
click to toggle source
# File test/unit/integrations_test.rb, line 16 def self.available? true end
matches?(klass)
click to toggle source
# File test/unit/integrations_test.rb, line 20 def self.matches?(klass) true end
Public Instance Methods
setup()
click to toggle source
# File test/unit/integrations_test.rb, line 4 def setup @klass = Class.new end
test_should_return_integration_class_if_match_found()
click to toggle source
# File test/unit/integrations_test.rb, line 12 def test_should_return_integration_class_if_match_found integration = Module.new do include StateMachine::Integrations::Base def self.available? true end def self.matches?(klass) true end end StateMachine::Integrations.const_set('Custom', integration) assert_equal integration, StateMachine::Integrations.match(@klass) ensure StateMachine::Integrations.send(:remove_const, 'Custom') end
test_should_return_nil_if_no_match_found()
click to toggle source
# File test/unit/integrations_test.rb, line 8 def test_should_return_nil_if_no_match_found assert_nil StateMachine::Integrations.match(@klass) end