问题描述
|
当我运行bundle exec rspec spec /时,出现以下错误:
`_app_views_demo_mailer_new_user_text_haml___514868986949697059_2155319320_502394691365870694\': undefined local variable or method `courses_url\' for #<#<Class:0x00000100eee3e0>:0x00000100eeb3c0> (ActionView::Template::Error)
相关视图部分为:
If you haven\'t already signed up for a course,you can do so here:
= courses_url
有问题的视图是.text.haml邮件程序。奇怪的是,实际的邮件程序只能读取\'courses_url \'。 Rake路由确认它存在...但是rspec抛出该错误,我很困惑。
有任何想法吗?
解决方法
请更新您的问题并添加规范代码...顺便说一句,我有一个类似的问题,我错过了打电话给
it
的错误(我用describe
而不是it
),却遇到了这个奇怪的错误。