Modified to be less dependent on exact method and constant counts.
authorJim Weirich <jim.weirich@gmail.com>
Tue, 20 Apr 2010 20:17:24 +0000 (16:17 -0400)
committerJim Weirich <jim.weirich@gmail.com>
Tue, 20 Apr 2010 20:17:24 +0000 (16:17 -0400)
src/about_class_methods.rb
src/about_scope.rb

index f8bc9b1..0728c47 100644 (file)
@@ -19,11 +19,11 @@ class AboutClassMethods < EdgeCase::Koan
 
   def test_objects_have_methods
     fido = Dog.new
-    assert_equal __(44), fido.methods.size
+    assert fido.methods.size > _n_(30)
   end
 
   def test_classes_have_methods
-    assert_equal __(79), Dog.methods.size
+    assert Dog.methods.size > _n_(40)
   end
 
   def test_you_can_define_methods_on_individual_objects
index 4f116d5..e322f17 100644 (file)
@@ -74,6 +74,6 @@ class AboutScope < EdgeCase::Koan
 
   def test_you_can_get_a_list_of_constants_for_any_class_or_module
     assert_equal __(["Dog"]), Jims.constants
-    assert_equal __(122), Object.constants.size
+    assert Object.constants.size > _n_(10)
   end
 end