私は現在、iPhone固有のHTMLメタタグを生成するために使用されるRailsプラグインに取り組んでいます。単体テストにActionView::TestCaseを使用しようとしていますが、同じエラーが発生し続けます。以下のファイルの内容とエラーを参照してください。任意のアイデアや助けをいただければ幸いです。
test_helper.rb
require 'rubygems'
require 'test/unit'
require 'active_support'
require 'action_view'
require File.join(File.dirname(__FILE__), '..', 'lib', 'iphone_helper')
iphone_test_helper.rb
require 'test_helper'
class IphoneHelperTest < ActionView::TestCase
test 'br' do
tag = tag('br')
assert_tag_in tag, '<br />'
end
end
エラー
RuntimeError: In order to use #url_for, you must include routing helpers explicitly. For instance, `include Rails.application.routes.url_helpers