# Ruby noobist, roobist?

**URL:** <https://www.ruby-forum.com/t/ruby-noobist-roobist/74724>\
**Category:** Ruby\
**Created:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/ruby-noobist-roobist/74724 "2006-11-07T10:53:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skotty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Skotty](https://www.ruby-forum.com/u/Skotty)\
**Post date:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/ruby-noobist-roobist/74724/1 "2006-11-07T10:53:55Z")

</div>

I know guys, I’m sorry.  
Anyways, I was wondering. I’ve been following a guide on  
[http://clarkware.com/cgi/blosxom/2005/04/index.html](http://clarkware.com/cgi/blosxom/2005/04/index.html)

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!

---

<div class="post-metadata">

**Author:** ![Skotty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Skotty](https://www.ruby-forum.com/u/Skotty)\
**Post date:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/ruby-noobist-roobist/74724/2 "2006-11-07T10:54:14Z")

</div>

On Thursday 02 November 2006 13:10, Skotty wrote:

> Here’s a sample of what I have.  
> 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!

require ‘test/unit’

class StringTest \< Test::Unit::TestCase  
def test\_length  
s = “Hello, World!”  
assert\_equal(13, s.length)  
end

def test\_expression\_substitution  
assert\_equal("", “#{'Hello! ’ \* 3}”)  
end  
end

---

<div class="post-metadata">

**Author:** ![Skotty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Skotty](https://www.ruby-forum.com/u/Skotty)\
**Post date:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/ruby-noobist-roobist/74724/3 "2006-11-07T10:54:15Z")

</div>

Sweet thanks for the quick response!  
----- Original Message -----  
From: “Michael F.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: “ruby-talk ML” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Sent: Wednesday, November 01, 2006 11:11 PM  
Subject: Re: Ruby noobist, roobist?

---

<div class="post-metadata">

**Author:** ![Skotty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/5e9695/32.png) [@Skotty](https://www.ruby-forum.com/u/Skotty)\
**Post date:** [November 9, 2006, 3:29am UTC](https://www.ruby-forum.com/t/ruby-noobist-roobist/74724/4 "2006-11-09T03:29:22Z")

</div>

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