--Apple-Mail-2--240864947
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset-ASCII;
	formatðïwed

I am new to Ruby and to programming.  One thing I like about Ruby is 
that one very quickly starts thinking about object-oriented programming 
concepts and practices.  Most of these concepts are quite difficult to 
learn, but one can see the beginnings of the path ahead fairly easily.  
For example, objects, classes, methods, UML, patterns, uses cases, CRC 
cards, and so on, are all difficult and can be thought about and or 
studied for years, but one can learn what they are about fairly quickly.

If only this were true for me for unit testing.  I have looked around 
and read a little, not all of it helpful.  I have formulated the 
following ideas about unit testing: (1) unit testing is good; (2) it is 
a good idea to write unit tests before coding a class; (3) uh . . . .

This leads to me to many questions: (1) how do you write a unit test?; 
(2) uh . . . .

The following example may not need unit testing in the real world, but 
is shown to show that I have thought about the problem a little and to 
show that my understanding of Ruby is somewhat superficial (for 
example, I have trouble following examples that talk about foo and bar).

class Link
methods: initialize, send_url
attributes: name, location, description

[unit tests go here? before the coding? what are assertions? what I am 
supposed to assert? what should go here?]

code:

class Link
	def initialize(n, l, d)
		@name  
		@location  
		@description  
	end
	def send_url
		puts @location
	end
end

Any comments, suggestions, references to other resources, thoughts, 
teaching, etc. would be very welcome.
--Apple-Mail-2--240864947
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
	charset-ASCII

I am new to Ruby and to programming.  One thing I like about Ruby is
that one very quickly starts thinking about object-oriented
programming concepts and practices.  Most of these concepts are quite
difficult to learn, but one can see the beginnings of the path ahead
fairly easily.  For example, objects, classes, methods, UML, patterns,
uses cases, CRC cards, and so on, are all difficult and can be thought
about and or studied for years, but one can learn what they are
<underline>about</underline> fairly quickly.


If only this were true for me for unit testing.  I have looked around
and read a little, not all of it helpful.  I have formulated the
following ideas about unit testing: (1) unit testing is good; (2) it
is a good idea to write unit tests before coding a class; (3) uh . . . .


This leads to me to many questions: (1) how do you write a unit test?;
(2) uh . . . .


The following example may not need unit testing in the real world, but
is shown to show that I have thought about the problem a little and to
show that my understanding of Ruby is somewhat superficial (for
example, I have trouble following examples that talk about foo and
bar).


class Link

methods: initialize, send_url

attributes: name, location, description


[unit tests go here? before the coding? what are assertions? what I am
supposed to assert? what should go here?]


code:


class Link

	def initialize(n, l, d)

		@name  

		@location  

		@description  

	end

	def send_url

		puts @location

	end

end


Any comments, suggestions, references to other resources, thoughts,
teaching, etc. would be very welcome.
--Apple-Mail-2--240864947--