<ANN> TeSLa, a Domain Specific Language for Unit Testing

Discussion in 'Ruby' started by javierg1975@gmail.com, Oct 31, 2005.

  1. Guest

    , Oct 31, 2005
    #1
    1. Advertising

  2. James Britt Guest

    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/JaviersBlog/2005/10/tesla-test-specific-language-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
    James Britt, Oct 31, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Maclean
    Replies:
    1
    Views:
    329
    Martin P. Hellwig
    Apr 13, 2010
  2. Ulrich Eckhardt

    unit-profiling, similar to unit-testing

    Ulrich Eckhardt, Nov 16, 2011, in forum: Python
    Replies:
    6
    Views:
    315
    Roy Smith
    Nov 18, 2011
  3. obscured by code

    <ANN> TeSLa 0.2.0 is out

    obscured by code, Nov 10, 2005, in forum: Ruby
    Replies:
    0
    Views:
    142
    obscured by code
    Nov 10, 2005
  4. Bill Mosteller
    Replies:
    0
    Views:
    209
    Bill Mosteller
    Oct 22, 2009
  5. Avi
    Replies:
    0
    Views:
    476
Loading...

Share This Page