diff --git a/app/controllers/guide_cards_controller.rb b/app/controllers/guide_cards_controller.rb index 1ed968a3..5610ff1d 100644 --- a/app/controllers/guide_cards_controller.rb +++ b/app/controllers/guide_cards_controller.rb @@ -1,4 +1,8 @@ # frozen_string_literal: true +# controller for GuideCards class GuideCardsController < ApplicationController + def index; end + + def show; end end diff --git a/app/helpers/guide_cards_helper.rb b/app/helpers/guide_cards_helper.rb index 43c1f0d0..fc4fa32a 100644 --- a/app/helpers/guide_cards_helper.rb +++ b/app/helpers/guide_cards_helper.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -# a helper for GuideCards +# helper for GuideCards module GuideCardsHelper end diff --git a/app/views/guide_cards/index.html.erb b/app/views/guide_cards/index.html.erb new file mode 100644 index 00000000..ce378a4d --- /dev/null +++ b/app/views/guide_cards/index.html.erb @@ -0,0 +1,2 @@ +
Find me in app/views/guide_cards/index.html.erb
diff --git a/app/views/guide_cards/show.html.erb b/app/views/guide_cards/show.html.erb new file mode 100644 index 00000000..dc37d904 --- /dev/null +++ b/app/views/guide_cards/show.html.erb @@ -0,0 +1,2 @@ +Find me in app/views/guide_cards/show.html.erb
diff --git a/config/routes.rb b/config/routes.rb index a891cb27..6eb3aee9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,8 @@ # frozen_string_literal: true Rails.application.routes.draw do + get 'guide_cards/index' + get 'guide_cards/show' resources :guide_cards # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html diff --git a/spec/requests/guide_cards_spec.rb b/spec/requests/guide_cards_spec.rb index 4db4d275..acc3a596 100644 --- a/spec/requests/guide_cards_spec.rb +++ b/spec/requests/guide_cards_spec.rb @@ -4,6 +4,16 @@ RSpec.describe 'GuideCards', type: :request do describe 'GET /index' do - pending "add some examples (or delete) #{__FILE__}" + it 'returns http success' do + get '/guide_cards/index' + expect(response).to have_http_status(:success) + end + end + + describe 'GET /show' do + it 'returns http success' do + get '/guide_cards/show' + expect(response).to have_http_status(:success) + end end end diff --git a/spec/views/guide_cards/index.html.erb_spec.rb b/spec/views/guide_cards/index.html.erb_spec.rb new file mode 100644 index 00000000..1fd373a6 --- /dev/null +++ b/spec/views/guide_cards/index.html.erb_spec.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe 'guide_cards/index.html.erb', type: :view do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/views/guide_cards/show.html.erb_spec.rb b/spec/views/guide_cards/show.html.erb_spec.rb new file mode 100644 index 00000000..7864cbb5 --- /dev/null +++ b/spec/views/guide_cards/show.html.erb_spec.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe 'guide_cards/show.html.erb', type: :view do + pending "add some examples to (or delete) #{__FILE__}" +end