Skip to content

Commit

Permalink
Merge pull request #49 from pulibrary/GuideCard-Controller
Browse files Browse the repository at this point in the history
Generated GuideCards controllers
  • Loading branch information
leefaisonr committed Mar 22, 2023
2 parents 4ae4fbe + 37d7f3f commit 0659031
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/controllers/guide_cards_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# frozen_string_literal: true

# controller for GuideCards
class GuideCardsController < ApplicationController
def index; end

def show; end
end
2 changes: 1 addition & 1 deletion app/helpers/guide_cards_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

# a helper for GuideCards
# helper for GuideCards
module GuideCardsHelper
end
2 changes: 2 additions & 0 deletions app/views/guide_cards/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>GuideCards#index</h1>
<p>Find me in app/views/guide_cards/index.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/guide_cards/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>GuideCards#show</h1>
<p>Find me in app/views/guide_cards/show.html.erb</p>
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -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

Expand Down
12 changes: 11 additions & 1 deletion spec/requests/guide_cards_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions spec/views/guide_cards/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions spec/views/guide_cards/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0659031

Please sign in to comment.