From: Jim Weirich Date: Tue, 20 Apr 2010 20:17:24 +0000 (-0400) Subject: Modified to be less dependent on exact method and constant counts. X-Git-Tag: cinci-day-of-ruby-2010~33 X-Git-Url: https://git.eng.unimelb.edu.au/public?a=commitdiff_plain;h=3b824d0e8614f62d173cc5ef54f901a29333498e;p=ruby_koans.git Modified to be less dependent on exact method and constant counts. --- diff --git a/src/about_class_methods.rb b/src/about_class_methods.rb index f8bc9b1..0728c47 100644 --- a/src/about_class_methods.rb +++ b/src/about_class_methods.rb @@ -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 diff --git a/src/about_scope.rb b/src/about_scope.rb index 4f116d5..e322f17 100644 --- a/src/about_scope.rb +++ b/src/about_scope.rb @@ -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