Ruby on rails 4 未定义的局部变量或方法`VICENTES#U path';
我正在使用迈克尔·哈特尔的教程来编写我自己的应用程序。我有以下测试。我注意到HartlRuby on rails 4 未定义的局部变量或方法`VICENTES#U path';,ruby-on-rails-4,rspec-rails,Ruby On Rails 4,Rspec Rails,我正在使用迈克尔·哈特尔的教程来编写我自己的应用程序。我有以下测试。我注意到Hartl需要'spec\u helper',而RSpec install创建的挂起的RSpec文件需要'rails\u helper'。我有 resources :venues 但是当我运行rspec时,我仍然得到一个错误,即路径未定义。以下是在规范/请求中定义的 require 'spec_helper' RSpec.describe Venue, type: :model do subject { page
需要'spec\u helper'
,而RSpec install创建的挂起的RSpec文件需要'rails\u helper'
。我有
resources :venues
但是当我运行rspec时,我仍然得到一个错误,即路径未定义。以下是在规范/请求中定义的
require 'spec_helper'
RSpec.describe Venue, type: :model do
subject { page }
describe 'index page' do
let(:venue) { FactoryGirl.create(:venue) }
before { visit venues_path }
it { should have_content(venue.name) }
end
end