<source id="4vppl"><ins id="4vppl"></ins></source>
<u id="4vppl"><sub id="4vppl"><label id="4vppl"></label></sub></u>
<object id="4vppl"></object>
  • <u id="4vppl"><li id="4vppl"><label id="4vppl"></label></li></u>

    <object id="4vppl"></object>
    <b id="4vppl"><sub id="4vppl"><tr id="4vppl"></tr></sub></b>

      <i id="4vppl"><thead id="4vppl"></thead></i>

      <thead id="4vppl"><li id="4vppl"><label id="4vppl"></label></li></thead>

      當前位置:首頁 > 網站舊欄目 > 學習園地 > 設計軟件教程 > 每天一劑Rails良藥之Write Tests for Your Helpers

      每天一劑Rails良藥之Write Tests for Your Helpers
      2010-01-14 07:10:05  作者:  來源:
      今天我們看看怎么測試我們的helper方法:
      Java代碼 復制代碼
      1. require File.dirname(__FILE__) + '/../test_helper'  
      2.   
      3. class HelperTest < Test::Unit::TestCase   
      4.   include ActionView::Helpers::UrlHelper   
      5.   include ActionView::Helpers::TextHelper   
      6.   include ActionView::Helpers::TagHelper   
      7.   include ApplicationHelper   
      8.   # include whatever helpers you want to test here, sometimes you'll need   
      9.   # to include some of the Rails helpers, as I've done above.   
      10.   
      11.   def test_some_helper   
      12.   end   
      13. end  

      通過include ApplicationHelper,則該類里面定義的所有方法都可以作為本地方法得到
      如果想測試其它類里面的helper方法,我們只需要將該類include即可

      安徽新華電腦學校專業職業規劃師為你提供更多幫助【在線咨詢
      国产午夜福三级在线播放_亚洲精品成a人片在线观看_亚洲自慰一区二区三区_久久棈精品久久久久久噜噜
      <source id="4vppl"><ins id="4vppl"></ins></source>
      <u id="4vppl"><sub id="4vppl"><label id="4vppl"></label></sub></u>
      <object id="4vppl"></object>
    1. <u id="4vppl"><li id="4vppl"><label id="4vppl"></label></li></u>

      <object id="4vppl"></object>
      <b id="4vppl"><sub id="4vppl"><tr id="4vppl"></tr></sub></b>

        <i id="4vppl"><thead id="4vppl"></thead></i>

        <thead id="4vppl"><li id="4vppl"><label id="4vppl"></label></li></thead>
        五月天婷婷亚洲熟女一区 | 日本欧美亚洲精品在线观看 | 在线欧美天码中文字幕 | 三级国产国语三级在线 | 亚洲天堂2021AV在线 | 中文字幕乱码熟女免费 |