命名空間
方法
包含的模組
- ActiveSupport::Testing::ConstantLookup
- ActionMailer::TestHelper
- Rails::Dom::Testing::Assertions::SelectorAssertions
- Rails::Dom::Testing::Assertions::DomAssertions
實例公開方法
read_fixture(動作) 連結
讀取給定郵件程式所使用的預設檔案。
這在透過於預設檔案中撰寫電子郵件內文來測試郵件程式時很有用。請參閱測試指南以取得具體範例: guides.rubyonrails.org/testing.html#revenge-of-the-fixtures
來源: 顯示 | 於 GitHub 上
# File actionmailer/lib/action_mailer/test_case.rb, line 82 def read_fixture(action) IO.readlines(File.join(Rails.root, "test", "fixtures", self.class.mailer_class.name.underscore, action)) end