spec/specs/follow_spec.rb in mongoid_follow-0.1.0 vs spec/specs/follow_spec.rb in mongoid_follow-0.2.0
- old
+ new
@@ -123,7 +123,16 @@
@bonnie.follow(@clyde)
@alec.follow(@clyde)
@bonnie.common_followees_with(@alec).should == [@gang, @clyde]
end
+
+ it "should respond on callbacks" do
+ @bonnie.respond_to?('after_follow').should be_true
+ @bonnie.respond_to?('after_unfollowed').should be_true
+ @bonnie.respond_to?('before_follow').should be_false
+
+ @gang.respond_to?('before_followed').should be_true
+ @gang.respond_to?('after_followed').should be_false
+ end
end
end