[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Ruby noobist, roobist?

Sammy Larbi

11/9/2006 2:28:00 AM

The 2nd end ends the class, so you should put the 2nd test above it...


Skotty wrote:

>I know guys, I'm sorry.
>Anyways, I was wondering. I've been following a guide on http://clarkware.com/cgi/blosxom/2005/04/...
>
>and on the first example for the tutorial he posts 2 test to do, at the end of the first test there are 2 "ends" followed by the next test.
>
>Now this is probably something I could have easily answered myself but where do I put the second test? before the 2 ends?
>
>Here's a sample of what I have.
>
>require 'test/unit'
>
>class StringTest < Test::Unit::TestCase
>
>def test_length
>s = "Hello, World!"
>assert_equal(13, s.length)
>end
>
>end
>
>def test_expression_substitution
>assert_equal("", "#{'Hello! ' * 3}")
>end
>
>when you run the script, it's suppose to tell you how many tests are run, and if any of them are wrong synatx. When I run it this way, it only shows one test and no error message. Am I doing something wrong?
>
>Anyways a little help please!
>
>
>