Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Ruby (http://www.velocityreviews.com/forums/f66-ruby.html)
-   -   <ANN> TeSLa, a Domain Specific Language for Unit Testing (http://www.velocityreviews.com/forums/t825660-ann-tesla-a-domain-specific-language-for-unit-testing.html)

javierg1975@gmail.com 10-31-2005 04:14 AM

<ANN> TeSLa, a Domain Specific Language for Unit Testing
 
Hi
I just posted version 0.1.0 of TeSLa, a Domain Specific Language (DSL)
for Unit Testing.
You can download TeSLa along with a small example script from
http://theniceweb.com/projects/tesla/tesla.zip (zip)
or here
http://theniceweb.com/projects/tesla/tesla.tar.gz (tar.gz)
I also posted a small article/tutorial explaining the rationale and use
of TeSLa here
http://www.theniceweb.com/JaviersBlo...-for-ruby.html


James Britt 10-31-2005 05:40 AM

Re: <ANN> TeSLa, a Domain Specific Language for Unit Testing
 
javierg1975@gmail.com wrote:
> Hi
> I just posted version 0.1.0 of TeSLa, a Domain Specific Language (DSL)
> for Unit Testing.
> You can download TeSLa along with a small example script from
> http://theniceweb.com/projects/tesla/tesla.zip (zip)
> or here
> http://theniceweb.com/projects/tesla/tesla.tar.gz (tar.gz)
> I also posted a small article/tutorial explaining the rationale and use
> of TeSLa here
> http://www.theniceweb.com/JaviersBlo...-for-ruby.html


This looks quite interesting. Two questions:

1. How does this compare to behavior-driven development?

http://daveastels.com/index.php?p=5

2. The TeSLa docs give this example, comparing Test::Unit and TesLa:

class TestCatalog < Test::Unit::TestCase
def test_add_item
catalog = Catalog.new()
catalog.items = [:item1, :item2, :item3]
catalog.add_item :item4
assert_equal(catalog.size, 4, "length should be 4")
end
end

would look like this in TeSLa

test_method :add_item => [:item4] do
requires {@items = [:item1, :item2, :item3]}
assert {size == 4}
end


How does the TeSLa version know what :item4 is for, or where it goes, or
what 'size' refers to? The example has no reference to Catalog; how
does the code know to test that class?

Thanks,

James
--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys




All times are GMT. The time now is 12:35 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.