Skip to content

Conversation

jonoterc
Copy link
Contributor

the test-file specific find_test_file method was matching namespaced model files when annotating non-namespaced models; using the same file resolution method for all file types fixes this.

e.g: with a User and a Foo::User model, User annotations were applied to both test/unit/user_test.rb as well as test/unit/foo/user_test.rb (order of operation was a factor here - if the non-namespaced model was annotated first this effect was not seen, as the namespaced annotations would overwrite and hide the issue)

Also, switched "mock" for "double" to kill deprecation warnings in specs

the special-purpose file resolution method for test/spec files was failing with namespaced test files (ex. User model attributes would annotate both test/unit/user_test.rb as well as test/unit/foo/user_test.rb, instead of only the former)
changing to get rid of deprecation warnings
@ctran
Copy link
Owner

ctran commented Feb 22, 2014

Thanks for the patch. I will try to merge it in this weekend.

ctran added a commit that referenced this pull request Feb 24, 2014
fix overwriting of namespaced model test annotations with non-namespaced model annotations
@ctran ctran merged commit 7cbdba6 into ctran:develop Feb 24, 2014
@jonoterc
Copy link
Contributor Author

thanks!

@ctran ctran added the bug label Feb 26, 2014
@ctran ctran added this to the 2.6.2 milestone Feb 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 participants