Ruby noobist, roobist?

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

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!

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

···

On Thursday 02 November 2006 13:10, 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/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!

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/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!

Sweet thanks for the quick response!

···

----- Original Message ----- From: "Michael Fellinger" <m.fellinger@gmail.com>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Wednesday, November 01, 2006 11:11 PM
Subject: Re: Ruby noobist, roobist?

On Thursday 02 November 2006 13:10, 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/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!

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