Forum: Ruby Getting test method names when getting output

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9239e324751b8db551789e5e16689438?d=identicon&s=25 Hunt Jon (Guest)
on 2008-12-18 14:58
(Received via mailing list)
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?
Aee77dba395ece0a04c688b05b07cd63?d=identicon&s=25 Daniel Berger (djberg96)
on 2008-12-18 15:25
(Received via mailing list)
Hunt Jon 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
Aafa8848c4b764f080b1b31a51eab73d?d=identicon&s=25 Phlip (Guest)
on 2008-12-18 16:06
(Received via mailing list)
Hunt Jon 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.
This topic is locked and can not be replied to.