Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #2975 > unrolled thread

Problem with displaying command line outputs

Started byJohn Smith <ks1911shooter@yahoo.com>
First post2011-04-15 15:07 -0500
Last post2011-04-20 09:47 -0500
Articles 3 — 2 participants

Back to article view | Back to comp.lang.ruby


Contents

  Problem with displaying command line outputs John Smith <ks1911shooter@yahoo.com> - 2011-04-15 15:07 -0500
    Re: Problem with displaying command line outputs John Smith <ks1911shooter@yahoo.com> - 2011-04-20 08:59 -0500
    Re: Problem with displaying command line outputs jake kaiden <jakekaiden@yahoo.com> - 2011-04-20 09:47 -0500

#2975 — Problem with displaying command line outputs

FromJohn Smith <ks1911shooter@yahoo.com>
Date2011-04-15 15:07 -0500
SubjectProblem with displaying command line outputs
Message-ID<48522f9d35b96f204cda9ff5764fa129@ruby-forum.com>
I am trying to run some tests, which utilize test::unit. Aside from the
typical assertions that generate dots, F/E and error messages, there are
some puts text that should be displayed too. This works fine when
running my test files (ie. test1.rb) one at a time from a command line.

However, when I run multiple tests in the same directory from one file,
which is either another .rb file that just runs each test one after
another through the ruby command, or optionally, I have set up a rake
file that iterates through everything, I get no output on the command
line. The tests do run for sure, but I would like to see all the output
as if I were running each test individually. Is there a way to force the
output to display?

Thanks in advance!

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [next] | [standalone]


#3243

FromJohn Smith <ks1911shooter@yahoo.com>
Date2011-04-20 08:59 -0500
Message-ID<54df47c559cf7242bd1ba97650922c00@ruby-forum.com>
In reply to#2975
I tried a few more approaches, but they don't work either. I have an .rb 
file that just requires all the other .rb files, but the problem is, I 
can't run tests by passing command line arguments that way.
Any suggestions? Thanks again!

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [next] | [standalone]


#3244

Fromjake kaiden <jakekaiden@yahoo.com>
Date2011-04-20 09:47 -0500
Message-ID<d007e6b34efbe07c2ffbd4683da2744e@ruby-forum.com>
In reply to#2975
hi john -

  don't know if this will work in your case, but i've found when doing 
similar tests/debugs that "p string" works when "puts string" doesn't. 
"p" calls obj.inspect, rather than obj.to_s - 
http://polishinggems.blogspot.com/2011/02/p-vs-puts-vs-print.html


 - j

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.ruby


csiph-web