Class: SuperPoller::Handler::TestCase

Inherits:
Object
  • Object
show all
Defined in:
lib/super_poller/test_case.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.should_handle(name) ⇒ Object



7
8
9
10
11
# File 'lib/super_poller/test_case.rb', line 7

def self.should_handle(name)
  should "handle a #{name.inspect} message" do
    assert handler.can_handle?(:name => name)
  end
end

Instance Method Details

#handlerObject



3
4
5
# File 'lib/super_poller/test_case.rb', line 3

def handler
  @handler ||= self.class.name.gsub(/Test$/, "").constantize.new
end