Permalink
Browse files

one more test

  • Loading branch information...
1 parent f07697a commit c4c831817da055f7a261d39f8dfc2544d349eaa3 @justinfrench committed Dec 31, 2008
Showing with 5 additions and 0 deletions.
  1. +5 −0 test/active_time_test.rb
View
@@ -215,6 +215,11 @@ def ending
assert @object.respond_to?(:summaries)
end
+ should "not respond to methods not named after collections of ActiveRecord objects" do
+ assert !@object.respond_to?(:oh_hello)
+ assert !@object.respond_to?(:foo?)
+ end
+
should "infer a class name from the missing method name" do
assert_equal "Post", ActiveTime.send(:class_name_for_method_name, "posts")
assert_equal "ActivityEvent", ActiveTime.send(:class_name_for_method_name, "activity_events")

0 comments on commit c4c8318

Please sign in to comment.