spec/ventable/ventable_spec.rb in ventable-0.0.3 vs spec/ventable/ventable_spec.rb in ventable-0.0.4

- old
+ new

@@ -1,7 +1,7 @@ require 'ventable' -require 'pp' + describe Ventable do before do class TestEvent include Ventable::Event end @@ -64,11 +64,11 @@ def set_flag! self.class.flag = true end end class TestEventObserver - def self.handle_test_event event + def self.handle_test event event.set_flag! end end TestEvent.notifies TestEventObserver TestEvent.flag.should be_false @@ -136,12 +136,12 @@ end end end it "should properly set the callback method name" do - SomeAwesomeEvent.default_callback_method.should == :handle_some_awesome_event - Blah::AnotherSweetEvent.default_callback_method.should == :handle_blah__another_sweet_event - SomeOtherStuffHappened.default_callback_method.should == :handle_some_other_stuff_happened_event + SomeAwesomeEvent.default_callback_method.should == :handle_some_awesome + Blah::AnotherSweetEvent.default_callback_method.should == :handle_blah__another_sweet + SomeOtherStuffHappened.default_callback_method.should == :handle_some_other_stuff_happened ClassWithCustomCallbackMethodEvent.default_callback_method.should == :handle_my_special_event end end describe "#configure" do