Heya folks,

I've added the beginnings of support for BDD-style testing to the  
script.aculo.us trunk.
Basically, you can now write tests that look like this (excerpt from  
bdd_test.html[1]):

Test.context("BDD-style testing",{

   'should automatically add extensions to strings': function(){
     'a'.shouldEqual('a');
     'a'.shouldNotEqual('b');
     'a'.shouldNotBeNull();
     'a'.shouldBeA(String);

     var aString = 'boo!';
     aString.shouldEqual('boo!');
     aString.shouldBeA(String);
     aString.shouldNotBeA(Number);
   }

});

It borrows heavily from RSpec[2], so you might want to check that out  
too, to
learn more about the ideas behind this.

Note that it's very hackish and basic at the moment.

Any feedback is appreciated.

Cheers,
Thomas

[1] http://dev.rubyonrails.org/browser/spinoffs/scriptaculous/test/ 
unit/bdd_test.html
[2] http://rspec.rubyforge.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---

Reply via email to