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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
That''s very cool. I''m a big fan on RSpec, and it''ll be nice to have something like that on the Javascript side, too. Have you considered making it separate from Scriptaculous, so that people who are just interested in testing can get just what they need and nothing more? --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---
unittest.js only requires Prototype. Best, Thomas Am 30.08.2006 um 03:47 schrieb John Beppu:> That''s very cool. I''m a big fan on RSpec, and it''ll be nice to > have something like that on the Javascript side, too. Have you > considered making it separate from Scriptaculous, so that people > who are just interested in testing can get just what they need and > nothing more? > > > > > >-- Thomas Fuchs wollzelle http://www.wollzelle.com questentier on AIM madrobby on irc.freenode.net http://www.fluxiom.com :: online digital asset management http://script.aculo.us :: Web 2.0 JavaScript http://mir.aculo.us :: Where no web developer has gone before --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs -~----------~----~----~----~------~----~------~--~---