added #find_event method to Model

This commit is contained in:
2011-03-13 20:28:17 +00:00
parent 8b711d4d9c
commit cdf52869d6
2 changed files with 10 additions and 1 deletions

View File

@@ -28,6 +28,11 @@ describe Redistat::Model do
finder.options[:till].should == one_hour_ago
end
it "should #find_event" do
Redistat::Event.should_receive(:find).with('ModelHelper1', 1)
ModelHelper1.find_event(1)
end
it "should listen to model-defined options" do
ModelHelper2.depth.should == :day
ModelHelper2.store_event.should == true