spec/adhearsion/events_spec.rb in adhearsion-2.3.3 vs spec/adhearsion/events_spec.rb in adhearsion-2.3.4
- old
+ new
@@ -91,9 +91,17 @@
result.should be == :bar
Events.clear_handlers :event, EventClass
end
+ it "should respond_to? any methods corresponding to classes for which handlers are defined" do
+ Events.register_handler :event_type_1 do |event|
+ end
+
+ Events.should respond_to(:event_type_1)
+ Events.should_not respond_to(:event_type_2)
+ end
+
describe '#draw' do
it "should allow registering handlers by type" do
result = nil
Events.draw do
event do