我正在使用https://github.com/RailsApps/rails3-bootstrap-devise-cancan默认的测试套装设置。我的spec / requests文件夹中有一个简单的规范
require 'spec_helper'
describe "Feedbacks" do
describe "guest must be denied to visit index path" do
before { visit feedbacks_path }
page.should have_selector ".alert", text: "Denied"
end
end
我遇到并错误“未定义的局部变量或方法`页面'为.....”,试图运行此测试。
我有
require 'capybara/rails'
和
RSpec.configure do |config|
.....
.......
config.include(Capybara::DSL)
在我的spec_healper
中并在gemfile“gem”capybara“,”> = 2.0.3“,:group =>:test”
请帮我摆脱这个恼人的错误......