Add a HomeController
This commit is contained in:
parent
dc03078217
commit
44b88349d7
4
app/controllers/home_controller.rb
Normal file
4
app/controllers/home_controller.rb
Normal file
@ -0,0 +1,4 @@
|
||||
class HomeController < ApplicationController
|
||||
def index
|
||||
end
|
||||
end
|
2
app/views/home/index.html.slim
Normal file
2
app/views/home/index.html.slim
Normal file
@ -0,0 +1,2 @@
|
||||
h1 Home#index
|
||||
p Find me in app/views/home/index.html.slim
|
@ -1,5 +1,9 @@
|
||||
Rails.application.routes.draw do
|
||||
get 'home/index'
|
||||
|
||||
devise_for :users
|
||||
|
||||
root 'home#index'
|
||||
# The priority is based upon order of creation: first created -> highest priority.
|
||||
# See how all your routes lay out with "rake routes".
|
||||
|
||||
|
12
spec/controllers/home_controller_spec.rb
Normal file
12
spec/controllers/home_controller_spec.rb
Normal file
@ -0,0 +1,12 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe HomeController, :type => :controller do
|
||||
|
||||
describe "GET index" do
|
||||
it "returns http success" do
|
||||
get :index
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue
Block a user