【发布时间】:2013-04-28 20:54:20
【问题描述】:
您好,我正在开发一个 Rails 项目,使用 vagrant box(ubuntu 服务器完全配置了乘客,尝试在类似生产的环境中进行开发,因为这是我的目标生产环境)。
我的问题是,当我运行“rails g controller people”时,我编写了一个简单的控制器规范,例如;
require 'spec_helper'
describe PeopleController do
describe "GET #index" do
it "responds with success" do
get :index
expect(response).to be_success
end
end
end
我使用“rspec spec/controllers/”运行它,即使没有在控制器中创建索引操作,测试也会立即通过。
您认为这可能是什么原因造成的? 谢谢你
【问题讨论】:
标签: ruby-on-rails passenger rspec-rails vagrant