在用 Rspec 和 Capybara 做测试的时候,我用到了这样一段代码 spec/features/authentication_page_spec.rb
describe "submitting to the create action" do
before { post micropost_index_path }
specify { response.should redirect_to(signin_path) }
end
得到了这样的错误信息
Failure/Error: before { post micropost_index_path }
NoMethodError:
undefined method `post' for #<RSpec::Core::ExampleGroup::Nested_3::Nested_2::Nested_1::Nested_1::Nested_1:0x007febde8995c8>
求助,谢谢呀~