Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 5060

Show
Ignore:
Timestamp:
09/07/06 12:37:26 (2 years ago)
Author:
madrobby
Message:

More README love and a CHANGELOG

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/javascript_test/README

    r5059 r5060  
    1 JavaScript testing plugin 
    2 ========================= 
     1=JavaScript testing plugin 
    32 
    43This plugin provides the script.aculo.us JavaScript unit testing framework 
    5 in way that integrates with Rails applications. 
     4in a way that integrates with Rails applications. 
    65 
    7 Usage 
    8 ===== 
     6==Usage 
    97 
    108Use the provided generator to built a skeleton for your JavaScript test. 
     
    1614about your app, just add tests. :) 
    1715 
    18 Example 
    19 ======= 
     16==Example 
    2017 
    2118Generate a JavaScript test skeleton for your public/javascripts/foo.js file: 
    2219 
    23 script/generate javascript_test foo 
     20  script/generate javascript_test foo 
    2421 
    25 Run the unit tests (a "assertTruth" dummy test is provided, so you should see 
    26 "SUCCESS" messages): 
     22Run the unit tests (an "assertTruth" dummy test is provided, 
     23so you should see "SUCCESS" messages), and see the automagically  
     24controlled browsers in action: 
    2725 
    28 rake test:javascripts 
     26  rake test:javascripts 
     27   
     28You have to manually close the browser window(s) afterwards. 
     29 
     30All in all, unittest.js is closely modelled on Test::Unit and there's  
     31also experimental support for RSpec-style BDD testing. You can find lots  
     32of examples in both the Prototype and script.aculo.us SVN repositories. 
    2933 
    3034You'll find more info on how to write tests on the script.aculo.us wiki: 
    31 http://wiki.script.aculo.us/scriptaculous/show/UnitTesting 
     35http://wiki.script.aculo.us/scriptaculous/show/UnitTesting. 
     36The documentation there is not really complete, so feel free to help out. 
    3237 
    33 Questions? 
    34 ========== 
     38==Questions? 
    3539 
    3640Join the Rails Spinoffs Google Group, or ask on #prototype on irc.freenode.net. 
    3741 
    38 TODO 
    39 ==== 
     42==Credits 
     43 
     44Big thanks with sugar on the top to Jon Tirsen, who authored the automated 
     45browser remote control-niceties. 
     46 
     47==TODO 
    4048 
    4149* Some more docs and a presentation :) 
    4250* Make ^C aborting work 
    4351 
     52== License 
     53 
    4454Copyright (c) 2005-2006 Thomas Fuchs, released under the MIT license