这是一个关于著名的Rails教程书的问题。我一直在跟踪教程,直到第3章。
我的系统生成的代码是:
require 'spec_helper'
describe "StaticPages" do
describe "GET /static_pages" do
it "works! (now write some real specs)" do
# Run the generator again with the --webrat flag if you want to use webrat methods/matchers
get static_pages_index_path
response.status.should be(200)
end
end
end正如您所看到的,它与在清单3.9中生成的代码非常不同
你知道发生了什么吗?我是否应该使用清单3.9中的代码或代码来继续本教程?
我使用Rails 4.0和Ruby2.0,与教程中作者的版本相同。
谢谢你帮忙。
发布于 2013-10-03 06:51:16
这只是系统在创建新的集成测试文件时生成的示例代码。这是无关紧要的。
您可以删除它,并与本教程中的代码一起移动。
https://stackoverflow.com/questions/19152439
复制相似问题