我刚刚完成了第9.3节 --Michael Hartl的书Ruby on Rails Tutorial的不成功编辑.我一直在努力弄清楚为什么我无法通过检查通过不成功编辑的测试.
这是我为本章添加的代码:
规格/请求/ authentication_pages_spec.rb
require 'spec_helper'
describe "Authentication" do
subject { page }
describe "signin page" do
before { visit signin_path }
it { should have_selector('h1', text: 'Sign in') }
it { should have_selector('title', text: 'Sign in') }
end
describe "signin" do
before { visit signin_path }
describe "with invalid information" do
before { click_button "Sign in" }
it { should have_selector('title', text: 'Sign in') }
it { should have_error_message('Invalid') }
describe …Run Code Online (Sandbox Code Playgroud)