我正在使用带有默认测试套装设置的https://github.com/RailsApps/rails3-bootstrap-devise-cancan 。我的规范/请求文件夹中有一个简单的规范
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
我遇到错误“未定义的局部变量或方法‘页面’ for.....”,试图运行这个测试。
我有
require 'capybara/rails'
和
RSpec.configure do |config|
.....
.......
config.include(Capybara::DSL)
在我的 spec_healper
在 gemfile "gem "capybara", ">= 2.0.3", :group => :test"
请帮我摆脱这个烦人的错误....