我followind Rails的教程,但有一个问题,第3.2.1节,就在图3.6.跑步时
$ bundle exec rspec spec/requests/static_pages_spec.rb
Run Code Online (Sandbox Code Playgroud)
我失败了
Failures:
1) StaticPages GET /static_pages works! (now write some real specs)
Failure/Error: get static_pages_index_path
NameError:
undefined local variable or method `static_pages_index_path' for # <RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x007fe7592b33b8>
# ./spec/requests/static_pages_spec.rb:7:in `block (3 levels) in <top (required)>'
Finished in 0.00454 seconds
1 example, 1 failure
Failed examples:
rspec ./spec/requests/static_pages_spec.rb:5 # StaticPages GET /static_pages works! (now write some real specs)
Run Code Online (Sandbox Code Playgroud)
这是文件:
require 'spec_helper'
describe "Static pages" do
describe "Home page" do
it …Run Code Online (Sandbox Code Playgroud)