From 784335b2474db11021557e398aec8191cb1d3021 Mon Sep 17 00:00:00 2001 From: Chris Preisinger Date: Sun, 25 Aug 2024 23:17:43 -0400 Subject: [PATCH] 127 Placeholder evaluator files --- app/controllers/evaluations_controller.rb | 5 +++++ app/helpers/evaluations_helper.rb | 4 ++++ app/views/evaluations/index.html.erb | 7 +++++++ config/routes.rb | 2 ++ spec/helpers/evaluations_helper_spec.rb | 15 +++++++++++++++ spec/requests/evaluations_spec.rb | 11 +++++++++++ spec/views/evaluations/index.html.erb_spec.rb | 5 +++++ 7 files changed, 49 insertions(+) create mode 100644 app/controllers/evaluations_controller.rb create mode 100644 app/helpers/evaluations_helper.rb create mode 100644 app/views/evaluations/index.html.erb create mode 100644 spec/helpers/evaluations_helper_spec.rb create mode 100644 spec/requests/evaluations_spec.rb create mode 100644 spec/views/evaluations/index.html.erb_spec.rb diff --git a/app/controllers/evaluations_controller.rb b/app/controllers/evaluations_controller.rb new file mode 100644 index 00000000..0d2c5fbc --- /dev/null +++ b/app/controllers/evaluations_controller.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class EvaluationsController < ApplicationController + def index; end +end diff --git a/app/helpers/evaluations_helper.rb b/app/helpers/evaluations_helper.rb new file mode 100644 index 00000000..81a87ad7 --- /dev/null +++ b/app/helpers/evaluations_helper.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +module EvaluationsHelper +end diff --git a/app/views/evaluations/index.html.erb b/app/views/evaluations/index.html.erb new file mode 100644 index 00000000..c4b53c2e --- /dev/null +++ b/app/views/evaluations/index.html.erb @@ -0,0 +1,7 @@ +
+
+

Evaluations

+ +

Find me in app/views/evaluations/index.html.erb

+
+
diff --git a/config/routes.rb b/config/routes.rb index 7a1763af..ed6705ff 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,6 +8,8 @@ get '/', to: "dashboard#index" get '/dashboard', to: "dashboard#index" + resources :evaluations, only: [:index] + # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. # Can be used by load balancers and uptime monitors to verify that the app is live. get "up" => "rails/health#show", as: :rails_health_check diff --git a/spec/helpers/evaluations_helper_spec.rb b/spec/helpers/evaluations_helper_spec.rb new file mode 100644 index 00000000..0f099e28 --- /dev/null +++ b/spec/helpers/evaluations_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the EvaluationsHelper. For example: +# +# describe EvaluationsHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +RSpec.describe EvaluationsHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/requests/evaluations_spec.rb b/spec/requests/evaluations_spec.rb new file mode 100644 index 00000000..a261626f --- /dev/null +++ b/spec/requests/evaluations_spec.rb @@ -0,0 +1,11 @@ +require 'rails_helper' + +RSpec.describe "Evaluations", type: :request do + describe "GET /index" do + it "returns http success" do + get "/evaluations" + expect(response).to have_http_status(:success) + expect(response.body).to include("Evaluations") + end + end +end diff --git a/spec/views/evaluations/index.html.erb_spec.rb b/spec/views/evaluations/index.html.erb_spec.rb new file mode 100644 index 00000000..dfdbcb0b --- /dev/null +++ b/spec/views/evaluations/index.html.erb_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe "evaluations/index.html.erb", type: :view do + pending "add some examples to (or delete) #{__FILE__}" +end