# Getting test method names when getting output

**URL:** <https://www.ruby-forum.com/t/getting-test-method-names-when-getting-output/155957>\
**Category:** Ruby\
**Created:** [December 18, 2008, 2:58pm UTC](https://www.ruby-forum.com/t/getting-test-method-names-when-getting-output/155957 "2008-12-18T14:58:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hunt\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9e5f3/32.png) [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Post date:** [December 18, 2008, 2:58pm UTC](https://www.ruby-forum.com/t/getting-test-method-names-when-getting-output/155957/1 "2008-12-18T14:58:45Z")

</div>

When I run a test file (e.g., ruby test\_user.rb), I get the test  
output about error and failure and about the overall number of tests,  
assertions, pass and so on.

But I would like to see all the test method names including the test  
that is passed.

Currently what I can see is a dot (.) indicating a pass.

Is there any way to get a list of tests inside a file?

---

<div class="post-metadata">

**Author:** ![Hunt\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9e5f3/32.png) [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Post date:** [December 18, 2008, 3:25pm UTC](https://www.ruby-forum.com/t/getting-test-method-names-when-getting-output/155957/2 "2008-12-18T15:25:48Z")

</div>

Hunt J. wrote:

> When I run a test file (e.g., ruby test\_user.rb), I get the test  
> output about error and failure and about the overall number of tests,  
> assertions, pass and so on.
> 
> But I would like to see all the test method names including the test  
> that is passed.
> 
> Currently what I can see is a dot (.) indicating a pass.
> 
> Is there any way to get a list of tests inside a file?

gem install turn

Regards,

Dan

---

<div class="post-metadata">

**Author:** ![Hunt\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b9e5f3/32.png) [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Post date:** [December 18, 2008, 4:06pm UTC](https://www.ruby-forum.com/t/getting-test-method-names-when-getting-output/155957/3 "2008-12-18T16:06:22Z")

</div>

Hunt J. wrote:

> When I run a test file (e.g., ruby test\_user.rb), I get the test  
> output about error and failure and about the overall number of tests,  
> assertions, pass and so on.
> 
> But I would like to see all the test method names including the test  
> that is passed.
> 
> Currently what I can see is a dot (.) indicating a pass.
> 
> Is there any way to get a list of tests inside a file?

Turn on verbose:

ruby user\_test.rb -v

In terms of style, the \_test suffix should not be a prefix, because  
otherwise  
everything in your test folder starts with T, and that impairs your  
desktop  
tools, such as command line tab completion.
