次の rSpec failed tests エラーが発生します。
私は何を間違えましたか?
どうもありがとう..
1) 認証サインイン ページの失敗/エラー: before { visit signin_path } NameError: undefined local variable or method signin_path' for # # ./spec/requests/authentication_pages_spec.rb:8:inblock (3 レベル) in '
2) 認証サインイン ページの失敗/エラー: before { visit signin_path } NameError: undefined local variable or method signin_path' for # # ./spec/requests/authentication_pages_spec.rb:8:inblock (3 レベル) in '
session_controller.rb:
class SessionsController < ApplicationController
def
new
end
def
create
end
def
destroy
end
end
ルート.rb:
SampleApp::Application.routes.draw do
resources :users
resources :sessions, only: [:new, :create, :destroy]
root to: 'static_pages#home'
match '/signup', to: 'users#new'
match '/signin', to: 'sessions#new'
match '/signout', to: 'sessions#destroy', via: :delete
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
終わり