Skip to content
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

described class #526

Closed
sivagollapalli opened this issue Apr 20, 2015 · 5 comments
Closed

described class #526

sivagollapalli opened this issue Apr 20, 2015 · 5 comments
Assignees

Comments

@sivagollapalli
Copy link

In rspec, we can access the described class using described_class method. Could we have the similar kind of method in minitest. If not then could we add it to minitest?

@teoljungberg
Copy link

That should be the same as self.class, if you want the described_class syntax you can just add this in your test_helper

class Minitest::Spec
  def described_class
    self.class
  end
end

@teoljungberg
Copy link

Actually, I was wrong. self.class will be the test-class and no the implementation-class

@zenspider zenspider self-assigned this May 6, 2015
@zenspider
Copy link
Collaborator

Personally, I think this style of testing is obfuscatory at best, but the value you want is in the civar named @desc.

@zenspider
Copy link
Collaborator

Please close this if you think it has been resolved.

@zenspider
Copy link
Collaborator

No response. Closing.

@minitest minitest locked and limited conversation to collaborators May 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants