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
Ensure spec names are correct #248
Conversation
I'm having to do |
Ugh, I stopped running minitest-rails tests against 1.8 and so I didn't catch that. Yeah... I can't think of a better way to do that than that.
|
Worse yet, I think it is an oddity in 1.8 at parse time only... I don't think it is even possible to hit the rescue (in this case) because everything all the way up has a to_s. |
This illustrates the issue. module DSL
def to_s
super
end
alias :name :to_s
end
class Bar
extend DSL
end
puts Bar.to_s
puts Bar.name # dsl_fail.rb:3:in `name': super: no superclass method `to_s' for Bar:Class (NoMethodError)
# from dsl_fail.rb:13 This fixed the problem with a test. I can do a pull request? |
@metaskills Is the change in 5577af8 sufficient? If so, I think this pull request could be closed. |
No it is not, that was the point of the whole conversation I had here I.8 is failing because class names come back as |
Did you see the tests I added in the gist? Should I just open up a new pull request/issue? |
Oh, because |
But I have a failing test!!! |
And a fix :) am I taking crazy pills? |
OK, I just created pull request #251 just getting flustered as I said I had this fixed and was trying to communicate with y'all before doing a pull request because Ryan asked first for a "repro" in the discussion here. So rather than going on a 3rd time how I have a working patch, let the PR in #251 speak for itself. |
Unbunch the panties. I've been nose down working on my talk for MWRC and haven't come up for air until now. I went with something in-between both your patches. Kept the code up in the module so anyone benefits but went with blowmage's implementation to avoid needless duplication. I also liked his tests more as they were slightly more complex (3 layers deep). I'll get this out shortly. |
…bug. (blowmage and metaskills respectively) [git-p4: depot-paths = "//src/minitest/dev/": change = 8299]
Thanks, I need that sometimes :) cheers and brews to you both 🍻 |
…bug. (blowmage and metaskills respectively) [git-p4: depot-paths = "//src/minitest/dev/": change = 8299]
Without this change I'm seeing spec names as "#Class:0x007ff82406a170", which blocks minitest-rails from being able to resolve the model/controller/mailer/etc from the spec name.