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

Changeset 5072

Show
Ignore:
Timestamp:
09/08/06 12:27:09 (2 years ago)
Author:
madrobby
Message:

Allow for manual execution of tests by manually providing an assets symlink (see README)

Files:

Legend:

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

    r5071 r5072  
    11*SVN* 
     2 
     3* Allow for manual execution of tests by manually providing an assets symlink (see README) 
    24 
    35* Updated CSS and generator to more Railsy layout and colors, borrowed from Tom Werners' #6036 default error pages patch 
  • plugins/javascript_test/generators/javascript_test/templates/javascript_test.html

    r5071 r5072  
    55  <title>JavaScript unit test file</title> 
    66  <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
    7   <script src="/assets/prototype.js" type="text/javascript"></script> 
    8   <script src="/assets/unittest.js" type="text/javascript"></script> 
     7  <script src="assets/prototype.js" type="text/javascript"></script> 
     8  <script src="assets/unittest.js" type="text/javascript"></script> 
    99   
    10   <script src="/javascripts/<%= name %>.js" type="text/javascript"></script> 
     10  <script src="../../public/javascripts/<%= name %>.js" type="text/javascript"></script> 
    1111   
    12   <link rel="stylesheet" href="/assets/unittest.css" type="text/css" /> 
     12  <link rel="stylesheet" href="assets/unittest.css" type="text/css" /> 
    1313</head> 
    1414<body> 
  • plugins/javascript_test/README

    r5060 r5072  
    2828You have to manually close the browser window(s) afterwards. 
    2929 
     30You can also run the test manually, by symlinking the assets directory. 
     31In your Rails application root, run: 
     32 
     33  ln -s ../../vendor/plugins/javascript_test/assets/ test/javascript/assets 
     34   
     35You then can just open the individual .html test files in your browser. 
     36 
    3037All in all, unittest.js is closely modelled on Test::Unit and there's  
    3138also experimental support for RSpec-style BDD testing. You can find lots  
  • plugins/javascript_test/tasks/javascript_test.rake

    r5059 r5072  
    33  JavaScriptTestrunner.new do |t|  
    44     
    5     t.mount('/assets', RAILS_ROOT+'/vendor/plugins/javascript_test/assets'
     5    t.mount("/", RAILS_ROOT
    66    t.mount("/test", RAILS_ROOT+'/test') 
    7     t.mount("/javascripts", RAILS_ROOT+'/public/javascripts') 
     7    t.mount('/test/javascript/assets', RAILS_ROOT+'/vendor/plugins/javascript_test/assets') 
    88     
    99    Dir.glob('test/javascript/*_test.html').each do |js|