-
-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tighten up ancestors specs #153
Conversation
All of the includes do not prevent unexpected results from being in the ancestor list. Tried to exclude any test items
ModuleSpecs::Child.ancestors.should include(ModuleSpecs::Child, ModuleSpecs::Super, ModuleSpecs::Basic, ModuleSpecs::Parent, Object, Kernel) | ||
def without_test_classes(klasses) | ||
ignore = %w{MSpec PP::ObjectMixin ModuleSpecs::IncludedInObject MainSpecs::Module ConstantSpecs::ModuleA} | ||
klasses.reject {|k| ignore.any? {|i| k.name.start_with?(i) } } | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method should be in the fixtures to make sure it's defined on a known module (currently it would be in some Object.new's singleton class, one object per file).
That's a great idea! |
33827a7
to
a19f5d9
Compare
a19f5d9
to
01ba680
Compare
Sure. I went ahead and put it in classes next to what it's being used for. Let me know if that's not OK. |
That's what I meant, thanks! |
92311a8 Module#prepend is private in ruby 2.0 e3283d5 Module#include and #prepend should be defined directly on Module 1afea36 Specify TCPServer#accept and #accept_nonblock when closed c4bb84f Add spec for String#force_encoding called on a frozen string. 0f1e1db Add spec for alias and undef raising a NameError which is not a NoMethodError 86e10f3 New spec for Kernel#exit across threads dfb2aa0 Refactor a couple Module#prepend specs a6bd065 Add a spec for Range#dup 8aa7b1e Super from a class method must work with prepended modules. 591ff4f Add a few more specs for defined? with scoped constants. b99f44c Add a few spec about the return value with ensure ee87540 Add yield-to-lambda cases that were not all consistent in JRuby. 156bb2b proc.call on object that calls #to_ary which returns nil should return original object 9145998 Add spec for alias on top level a924c74 Add specs for results of begin-end blocks 193cf30 New spec for setting visibility from a block f987230 Clarify private spec 22e0298 Add spec for nested methods in a "def expr.meth" 142a876 Add spec for nested methods in instance_eval 8d7b807 Ensure the variable can be read from Binding#eval after Binding#local_variable_set fe35f8a Actually use a shadowed variable in Binding#local_variables spec 092639a Remove inappropriate spec 842d3aa Fix UnboundMethod#super_method to not be order dependent bfd0a7e Merge pull request #155 from wied03/master f6ebc9b Follow up for ruby/spec#153 5b76fa0 Merge pull request #154 from wied03/master 948839f Test struct methods ending in ?, ! adbb7de Exact match for without_test_modules 58f9bad Fix style in Module#ancestors spec da511ce Merge pull request #153 from wied03/tighten_ancestors 01ba680 Exclude more test modules 278546d Tighten up ancestors specs c49e802 Add a few more check that methods do not end up defined on Object a81b5d3 Merge pull request #150 from wied03/instance_eval_class_mod e27298c Merge pull request #148 from wied03/module_instance_methods 35164b4 Test instance eval/exec on classes and modules 7a45ecb Ensure including a module doesn't prevent instance_methods from working b188d8e Merge pull request #147 from wied03/multiple_remove_meth f554ff9 Clarify the file organization 004151e Specify that Class#new yield the new Class dba4b94 Merge pull request #149 from wied03/mod_class_to_s 98235ef A start at module/class#to_s 4d1cf90 Merge pull request #152 from kachick/struct-new-passes-subclass-to-block 8fdfc4f Add a spec for block parameter in Struct.new f390fcb Improve definition spaces for some Struct.new behaviors 7df9151 Merge pull request #151 from wied03/struct_with_block 4890c67 Improve struct with block tests 9ff4c13 Fully test multiple remove_methods at once 122e1e1 Merge pull request #145 from wied03/master 6b57785 Another case that wasn't working on Opal 4025c0e Only allow #extend to throw the error in Kernel#extend 7551ce6 Kernel#extend raises a TypeError when the argument is not a Module df5dfc6 Merge pull request #143 from ruby/elia/unnecessary-mutable-string-use a7acf82 Object instead of a String for singleton spec c9cc7ae OpenStruct#new_ostruct_member is now a protected method 1b42fb9 Do not access private internal state in the OpenStruct#new_ostruct_member spec c7f0b73 remove ruby_bug related to old releases 5786f3a remove duplicate specs Float#<=>. f5323b8 remove trailing spaces 1508e8b Merge pull request #142 from ruby/elia/time_yday 2463dda Simplify the Time#yday 7472ad9 Test Time#yday for each day of each month c9ff9cf Merge pull request #141 from ruby/elia/not_match_spec aa56fe8 Minor fixes 17c66fa Add initial specs for Kernel#!~ 391d026 Merge pull request #139 from wied03/master af22315 Merge pull request #140 from wied03/defined_improve db9a977 Test more granular defined? scenarios 49012ea Added another exception inspect case that wasn't covered 7512517 Update to latest ruby releases d50b1bd Fix specdoc in Regexp#options 23585e7 Merge pull request #137 from wied03/master fcf6a05a Cover another regexp case that was failing in Opal bde1725 Opal is treating // as if it was created with Regexp.allocate, so add a non encoding based options test of // that it can execute and also test that match fails the same way options does 7819cb3 FreeBSD and NetBSD supports birthtime git-subtree-dir: spec/ruby git-subtree-split: 92311a8114663b4ae81a086699c4510271fff1ab
All of the includes do not prevent unexpected results from being in the ancestor list. Tried to exclude any test modules that may end up in here