From c683d455ee2fddbd98417a03ac6fb7bf4b86c285 Mon Sep 17 00:00:00 2001 From: Chris Preisinger Date: Fri, 23 Aug 2024 16:02:31 -0400 Subject: [PATCH 1/3] 125 Placeholder challenge manager eval files --- app/controllers/evaluation_forms_controller.rb | 5 +++++ app/controllers/manage_submissions_controller.rb | 5 +++++ app/helpers/evaluation_forms_helper.rb | 4 ++++ app/helpers/manage_submissions_helper.rb | 4 ++++ app/views/evaluation_forms/index.html.erb | 7 +++++++ app/views/manage_submissions/index.html.erb | 7 +++++++ config/routes.rb | 3 +++ spec/helpers/evaluation_forms_helper_spec.rb | 15 +++++++++++++++ spec/helpers/manage_submissions_helper_spec.rb | 15 +++++++++++++++ spec/requests/evaluation_forms_spec.rb | 11 +++++++++++ spec/requests/manage_submissions_spec.rb | 11 +++++++++++ .../views/evaluation_forms/index.html.erb_spec.rb | 5 +++++ .../manage_submissions/index.html.erb_spec.rb | 5 +++++ 13 files changed, 97 insertions(+) create mode 100644 app/controllers/evaluation_forms_controller.rb create mode 100644 app/controllers/manage_submissions_controller.rb create mode 100644 app/helpers/evaluation_forms_helper.rb create mode 100644 app/helpers/manage_submissions_helper.rb create mode 100644 app/views/evaluation_forms/index.html.erb create mode 100644 app/views/manage_submissions/index.html.erb create mode 100644 spec/helpers/evaluation_forms_helper_spec.rb create mode 100644 spec/helpers/manage_submissions_helper_spec.rb create mode 100644 spec/requests/evaluation_forms_spec.rb create mode 100644 spec/requests/manage_submissions_spec.rb create mode 100644 spec/views/evaluation_forms/index.html.erb_spec.rb create mode 100644 spec/views/manage_submissions/index.html.erb_spec.rb diff --git a/app/controllers/evaluation_forms_controller.rb b/app/controllers/evaluation_forms_controller.rb new file mode 100644 index 00000000..34119c8b --- /dev/null +++ b/app/controllers/evaluation_forms_controller.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class EvaluationFormsController < ApplicationController + def index; end +end diff --git a/app/controllers/manage_submissions_controller.rb b/app/controllers/manage_submissions_controller.rb new file mode 100644 index 00000000..0505d138 --- /dev/null +++ b/app/controllers/manage_submissions_controller.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class ManageSubmissionsController < ApplicationController + def index; end +end diff --git a/app/helpers/evaluation_forms_helper.rb b/app/helpers/evaluation_forms_helper.rb new file mode 100644 index 00000000..104f5ae5 --- /dev/null +++ b/app/helpers/evaluation_forms_helper.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +module EvaluationFormsHelper +end diff --git a/app/helpers/manage_submissions_helper.rb b/app/helpers/manage_submissions_helper.rb new file mode 100644 index 00000000..fcdfe6fb --- /dev/null +++ b/app/helpers/manage_submissions_helper.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +module ManageSubmissionsHelper +end diff --git a/app/views/evaluation_forms/index.html.erb b/app/views/evaluation_forms/index.html.erb new file mode 100644 index 00000000..c93238e6 --- /dev/null +++ b/app/views/evaluation_forms/index.html.erb @@ -0,0 +1,7 @@ +
+
+

Evaluation Forms

+ +

Placeholder text for Evaluation Forms.

+
+
diff --git a/app/views/manage_submissions/index.html.erb b/app/views/manage_submissions/index.html.erb new file mode 100644 index 00000000..7eb48703 --- /dev/null +++ b/app/views/manage_submissions/index.html.erb @@ -0,0 +1,7 @@ +
+
+

Manage Submissions

+ +

Placeholder text for Manage Submissions.

+
+
\ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 7a1763af..bf9cb130 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -8,6 +8,9 @@ get '/', to: "dashboard#index" get '/dashboard', to: "dashboard#index" + resources :evaluation_forms, only: [:index] + resources :manage_submissions, 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/evaluation_forms_helper_spec.rb b/spec/helpers/evaluation_forms_helper_spec.rb new file mode 100644 index 00000000..5b93a9b5 --- /dev/null +++ b/spec/helpers/evaluation_forms_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the EvaluationFormsHelper. For example: +# +# describe EvaluationFormsHelper 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 EvaluationFormsHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/helpers/manage_submissions_helper_spec.rb b/spec/helpers/manage_submissions_helper_spec.rb new file mode 100644 index 00000000..84840f50 --- /dev/null +++ b/spec/helpers/manage_submissions_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the ManageSubmissionsHelper. For example: +# +# describe ManageSubmissionsHelper 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 ManageSubmissionsHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/requests/evaluation_forms_spec.rb b/spec/requests/evaluation_forms_spec.rb new file mode 100644 index 00000000..9171ccf3 --- /dev/null +++ b/spec/requests/evaluation_forms_spec.rb @@ -0,0 +1,11 @@ +require 'rails_helper' + +RSpec.describe "EvaluationForms", type: :request do + describe "GET /evaluation_forms" do + it "renders the index view with the correct header" do + get evaluation_forms_path + expect(response).to have_http_status(:success) + expect(response.body).to include("Evaluation Forms") + end + end +end diff --git a/spec/requests/manage_submissions_spec.rb b/spec/requests/manage_submissions_spec.rb new file mode 100644 index 00000000..3b1bb79b --- /dev/null +++ b/spec/requests/manage_submissions_spec.rb @@ -0,0 +1,11 @@ +require 'rails_helper' + +RSpec.describe "ManageSubmissions", type: :request do + describe "GET /manage_submissions" do + it "renders the index view with the correct header" do + get manage_submissions_path + expect(response).to have_http_status(:success) + expect(response.body).to include("Manage Submissions") + end + end +end diff --git a/spec/views/evaluation_forms/index.html.erb_spec.rb b/spec/views/evaluation_forms/index.html.erb_spec.rb new file mode 100644 index 00000000..0019feeb --- /dev/null +++ b/spec/views/evaluation_forms/index.html.erb_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe "evaluation_forms/index.html.erb", type: :view do + pending "add some examples to (or delete) #{__FILE__}" +end diff --git a/spec/views/manage_submissions/index.html.erb_spec.rb b/spec/views/manage_submissions/index.html.erb_spec.rb new file mode 100644 index 00000000..6fd7043e --- /dev/null +++ b/spec/views/manage_submissions/index.html.erb_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe "manage_submissions/index.html.erb", type: :view do + pending "add some examples to (or delete) #{__FILE__}" +end From 85c0ac982824fdfef391a293fb994d872b2a94e7 Mon Sep 17 00:00:00 2001 From: Chris Preisinger Date: Mon, 26 Aug 2024 16:25:27 -0400 Subject: [PATCH 2/3] 125 Fix rubocop codeclimate failures --- .rubocop.yml | 1 + spec/helpers/evaluation_forms_helper_spec.rb | 2 +- spec/helpers/manage_submissions_helper_spec.rb | 2 +- spec/requests/evaluation_forms_spec.rb | 2 +- spec/requests/manage_submissions_spec.rb | 2 +- spec/views/evaluation_forms/index.html.erb_spec.rb | 2 +- spec/views/manage_submissions/index.html.erb_spec.rb | 2 +- 7 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 9faa4d4f..f77c5ee6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -85,6 +85,7 @@ Rails/SkipsModelValidations: RSpec/DescribeClass: Exclude: - 'spec/lib/tasks/**/*' + - 'spec/views/**/*' RSpec/DescribedClass: SkipBlocks: true diff --git a/spec/helpers/evaluation_forms_helper_spec.rb b/spec/helpers/evaluation_forms_helper_spec.rb index 5b93a9b5..00405f34 100644 --- a/spec/helpers/evaluation_forms_helper_spec.rb +++ b/spec/helpers/evaluation_forms_helper_spec.rb @@ -10,6 +10,6 @@ # end # end # end -RSpec.describe EvaluationFormsHelper, type: :helper do +RSpec.describe EvaluationFormsHelper do pending "add some examples to (or delete) #{__FILE__}" end diff --git a/spec/helpers/manage_submissions_helper_spec.rb b/spec/helpers/manage_submissions_helper_spec.rb index 84840f50..63ec0607 100644 --- a/spec/helpers/manage_submissions_helper_spec.rb +++ b/spec/helpers/manage_submissions_helper_spec.rb @@ -10,6 +10,6 @@ # end # end # end -RSpec.describe ManageSubmissionsHelper, type: :helper do +RSpec.describe ManageSubmissionsHelper do pending "add some examples to (or delete) #{__FILE__}" end diff --git a/spec/requests/evaluation_forms_spec.rb b/spec/requests/evaluation_forms_spec.rb index 9171ccf3..787a4189 100644 --- a/spec/requests/evaluation_forms_spec.rb +++ b/spec/requests/evaluation_forms_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe "EvaluationForms", type: :request do +RSpec.describe "EvaluationForms" do describe "GET /evaluation_forms" do it "renders the index view with the correct header" do get evaluation_forms_path diff --git a/spec/requests/manage_submissions_spec.rb b/spec/requests/manage_submissions_spec.rb index 3b1bb79b..78b83cd3 100644 --- a/spec/requests/manage_submissions_spec.rb +++ b/spec/requests/manage_submissions_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe "ManageSubmissions", type: :request do +RSpec.describe "ManageSubmissions" do describe "GET /manage_submissions" do it "renders the index view with the correct header" do get manage_submissions_path diff --git a/spec/views/evaluation_forms/index.html.erb_spec.rb b/spec/views/evaluation_forms/index.html.erb_spec.rb index 0019feeb..418c2c93 100644 --- a/spec/views/evaluation_forms/index.html.erb_spec.rb +++ b/spec/views/evaluation_forms/index.html.erb_spec.rb @@ -1,5 +1,5 @@ require 'rails_helper' -RSpec.describe "evaluation_forms/index.html.erb", type: :view do +RSpec.describe "evaluation_forms/index.html.erb" do pending "add some examples to (or delete) #{__FILE__}" end diff --git a/spec/views/manage_submissions/index.html.erb_spec.rb b/spec/views/manage_submissions/index.html.erb_spec.rb index 6fd7043e..243b4193 100644 --- a/spec/views/manage_submissions/index.html.erb_spec.rb +++ b/spec/views/manage_submissions/index.html.erb_spec.rb @@ -1,5 +1,5 @@ require 'rails_helper' -RSpec.describe "manage_submissions/index.html.erb", type: :view do +RSpec.describe "manage_submissions/index.html.erb" do pending "add some examples to (or delete) #{__FILE__}" end From 59dd9303ebbc998e7225980913bffed3319c51c9 Mon Sep 17 00:00:00 2001 From: Chris Preisinger Date: Mon, 26 Aug 2024 19:36:34 -0400 Subject: [PATCH 3/3] 125 Remove unused view specs --- .rubocop.yml | 1 - spec/views/evaluation_forms/index.html.erb_spec.rb | 5 ----- spec/views/manage_submissions/index.html.erb_spec.rb | 5 ----- 3 files changed, 11 deletions(-) delete mode 100644 spec/views/evaluation_forms/index.html.erb_spec.rb delete mode 100644 spec/views/manage_submissions/index.html.erb_spec.rb diff --git a/.rubocop.yml b/.rubocop.yml index f77c5ee6..9faa4d4f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -85,7 +85,6 @@ Rails/SkipsModelValidations: RSpec/DescribeClass: Exclude: - 'spec/lib/tasks/**/*' - - 'spec/views/**/*' RSpec/DescribedClass: SkipBlocks: true diff --git a/spec/views/evaluation_forms/index.html.erb_spec.rb b/spec/views/evaluation_forms/index.html.erb_spec.rb deleted file mode 100644 index 418c2c93..00000000 --- a/spec/views/evaluation_forms/index.html.erb_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'rails_helper' - -RSpec.describe "evaluation_forms/index.html.erb" do - pending "add some examples to (or delete) #{__FILE__}" -end diff --git a/spec/views/manage_submissions/index.html.erb_spec.rb b/spec/views/manage_submissions/index.html.erb_spec.rb deleted file mode 100644 index 243b4193..00000000 --- a/spec/views/manage_submissions/index.html.erb_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'rails_helper' - -RSpec.describe "manage_submissions/index.html.erb" do - pending "add some examples to (or delete) #{__FILE__}" -end