works for me ;-)
require 'test/unit'
puts "## Begin test THIS WORKS FINE!"
class DNX_1 < Test::Unit::TestCase
def test1
puts "Howdy" #THIS DOES NOT WORK!
assert( true )
puts "Howdy" #THIS DOES NOT WORK!
assert_equal( 1,1)
end
end
produces
## Begin test THIS WORKS FINE!
Loaded suite C:/temp/carl
Started
Howdy
Howdy
.
Finished in 0.0 seconds.
1 tests, 2 assertions, 0 failures, 0 errors
Are you possibly overriding the puts statement?
Also breakpoint is way nicer for debugging
require 'test/unit'
require 'breakpoint'
puts "## Begin test THIS WORKS FINE!"
class DNX_1 < Test::Unit::TestCase
def test1
a = true
breakpoint
assert(a )
puts "Howdy" #THIS DOES NOT WORK!
assert_equal( 1,1)
end
end
when it reaches the breakpoint line, it creates an irb session, allowing you to
do
puts a
or a= false
or whatever and then when you exit the irb session, normal execution of the
script resumes
----- Original Message -----
From: [EMAIL PROTECTED]
Date: Tuesday, February 20, 2007 1:59 pm
Subject: [Wtr-general] Print statements
>
>
>
>
> Good afternoon:
>
> This is going to be an extremely silly question. I am trying to
> troubleshoot a script so I thought I could use a print statement
> after each
> line of code. My first "puts" statement displays the proper
> output on the
> Eclipse Console. All of the "puts" statements within the CLASS do not
> display to the console.
>
> I tried substituting print.
>
> I searched various ruby programming guides and the solution is
> just not
> jumping out at me. With a Class or method what is the proper
> syntax for
> printing a statement to the console?
>
> Thanks in advance for your suggestions!
>
> Carl
>
>
> puts "## Begin test THIS WORKS FINE!
>
> class DNX_1 < Test::Unit::TestCase
>
>
> def test 1
>
>
> puts "Howdy" THIS DOES NOT WORK!
>
>
> @ie.link(:text, "ADD NEW...").click
>
>
> puts "Howdy" THIS DOES NOT WORK!
>
>
> end
>
>
> end
>
> Carl L. Shaulis
> Convergys - Senior Analyst
> 512-634-0607
>
>
>
> --
> "NOTICE: The information contained in this electronic mail
> transmission is
> intended by Convergys Corporation for the use of the named
> individual or
> entity to which it is directed and may contain information that is
> privileged or otherwise confidential. If you have received this
> electronicmail transmission in error, please delete it from your
> system without
> copying or forwarding it, and notify the sender of the error by
> reply email
> or by telephone (collect), so that the sender's address records
> can be
> corrected."
>
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general