diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9386e3b10..c1d34c237 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -483,12 +483,6 @@ RSpecRails/HaveHttpStatus: - 'spec/controllers/likes_controller_spec.rb' - 'spec/requests/harvests_spec.rb' -# Offense count: 17 -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: Inferences. -RSpecRails/InferredSpecType: - Enabled: false - # Offense count: 30 # Configuration parameters: Database. # SupportedDatabases: mysql, postgresql diff --git a/spec/controllers/api/v1/plantings_controller_spec.rb b/spec/controllers/api/v1/plantings_controller_spec.rb index f6506d140..49a009e2b 100644 --- a/spec/controllers/api/v1/plantings_controller_spec.rb +++ b/spec/controllers/api/v1/plantings_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe Api::V1::PlantingsController, type: :controller do +RSpec.describe Api::V1::PlantingsController do subject { JSON.parse response.body } let!(:member) { create(:member) } diff --git a/spec/controllers/garden_types_controller_spec.rb b/spec/controllers/garden_types_controller_spec.rb index 0fb1d619c..7b3bf517e 100644 --- a/spec/controllers/garden_types_controller_spec.rb +++ b/spec/controllers/garden_types_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe GardenTypesController, type: :controller do +RSpec.describe GardenTypesController do include Devise::Test::ControllerHelpers let(:valid_params) { { name: 'My second GardenType' } } diff --git a/spec/controllers/gardens_controller_spec.rb b/spec/controllers/gardens_controller_spec.rb index 4a3c30c66..97cd933c8 100644 --- a/spec/controllers/gardens_controller_spec.rb +++ b/spec/controllers/gardens_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe GardensController, type: :controller do +RSpec.describe GardensController do include Devise::Test::ControllerHelpers let(:valid_params) { { name: 'My second Garden' } } diff --git a/spec/features/percy/percy_spec.rb b/spec/features/percy/percy_spec.rb index 25ecaccf7..34bb00373 100644 --- a/spec/features/percy/percy_spec.rb +++ b/spec/features/percy/percy_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe 'Test with visual testing', :js, type: :feature do +describe 'Test with visual testing', :js do # Use the same random seed every time so our random data is the same # on every run, so doesn't trigger percy to see changes before { Faker::Config.random = Random.new(42) } diff --git a/spec/helpers/buttons_helper_spec.rb b/spec/helpers/buttons_helper_spec.rb index 42b81ef54..fbfca21e1 100644 --- a/spec/helpers/buttons_helper_spec.rb +++ b/spec/helpers/buttons_helper_spec.rb @@ -12,7 +12,7 @@ require 'rails_helper' # end # end # end -RSpec.describe ButtonsHelper, type: :helper do +RSpec.describe ButtonsHelper do before { allow(self).to receive(:can?).and_return(true) } let(:garden) { create(:garden) } diff --git a/spec/helpers/event_helper_spec.rb b/spec/helpers/event_helper_spec.rb index 38e1307c3..21ec50d94 100644 --- a/spec/helpers/event_helper_spec.rb +++ b/spec/helpers/event_helper_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe EventHelper, type: :helper do +RSpec.describe EventHelper do subject { resolve_model(event) } let(:planting) { create(:planting) } diff --git a/spec/models/crop_companion_spec.rb b/spec/models/crop_companion_spec.rb index cc0d2913a..9911f4bea 100644 --- a/spec/models/crop_companion_spec.rb +++ b/spec/models/crop_companion_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe CropCompanion, type: :model do +RSpec.describe CropCompanion do it 'has a crop' do cc = described_class.new cc.crop_a = create :tomato diff --git a/spec/requests/api/v1/activities_request_spec.rb b/spec/requests/api/v1/activities_request_spec.rb index aad0992b2..099939842 100644 --- a/spec/requests/api/v1/activities_request_spec.rb +++ b/spec/requests/api/v1/activities_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Activities', type: :request do +RSpec.describe 'Activities' do subject { JSON.parse response.body } let(:member) { create(:member) } diff --git a/spec/requests/api/v1/crop_request_spec.rb b/spec/requests/api/v1/crop_request_spec.rb index e25a697bc..d933f47d8 100644 --- a/spec/requests/api/v1/crop_request_spec.rb +++ b/spec/requests/api/v1/crop_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Crops', type: :request do +RSpec.describe 'Crops' do subject { JSON.parse response.body } let(:headers) { { 'Accept' => 'application/vnd.api+json' } } diff --git a/spec/requests/api/v1/gardens_request_spec.rb b/spec/requests/api/v1/gardens_request_spec.rb index 2e1bd7300..d93e467f2 100644 --- a/spec/requests/api/v1/gardens_request_spec.rb +++ b/spec/requests/api/v1/gardens_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Gardens', type: :request do +RSpec.describe 'Gardens' do subject { JSON.parse response.body } let(:headers) { { 'Accept' => 'application/vnd.api+json' } } diff --git a/spec/requests/api/v1/harvests_request_spec.rb b/spec/requests/api/v1/harvests_request_spec.rb index 02ce53a7a..db8965df3 100644 --- a/spec/requests/api/v1/harvests_request_spec.rb +++ b/spec/requests/api/v1/harvests_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Harvests', type: :request do +RSpec.describe 'Harvests' do subject { JSON.parse response.body } let(:headers) { { 'Accept' => 'application/vnd.api+json' } } diff --git a/spec/requests/api/v1/members_request_spec.rb b/spec/requests/api/v1/members_request_spec.rb index 06771899f..65f056a24 100644 --- a/spec/requests/api/v1/members_request_spec.rb +++ b/spec/requests/api/v1/members_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Members', type: :request do +RSpec.describe 'Members' do subject { JSON.parse response.body } let(:headers) { { 'Accept' => 'application/vnd.api+json' } } diff --git a/spec/requests/api/v1/photos_request_spec.rb b/spec/requests/api/v1/photos_request_spec.rb index d6a344819..8e7b650c9 100644 --- a/spec/requests/api/v1/photos_request_spec.rb +++ b/spec/requests/api/v1/photos_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Photos', type: :request do +RSpec.describe 'Photos' do subject { JSON.parse response.body } let(:headers) { { 'Accept' => 'application/vnd.api+json' } } diff --git a/spec/requests/api/v1/plantings_request_spec.rb b/spec/requests/api/v1/plantings_request_spec.rb index 2ec2f8b50..e5ae4a475 100644 --- a/spec/requests/api/v1/plantings_request_spec.rb +++ b/spec/requests/api/v1/plantings_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Plantings', type: :request do +RSpec.describe 'Plantings' do subject { JSON.parse response.body } let(:headers) { { 'Accept' => 'application/vnd.api+json' } } diff --git a/spec/requests/api/v1/seeds_request_spec.rb b/spec/requests/api/v1/seeds_request_spec.rb index 7bd27f71e..d2dcb419b 100644 --- a/spec/requests/api/v1/seeds_request_spec.rb +++ b/spec/requests/api/v1/seeds_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe 'Seeds', type: :request do +RSpec.describe 'Seeds' do subject { JSON.parse response.body } let(:headers) { { 'Accept' => 'application/vnd.api+json' } } diff --git a/spec/requests/garden_types_spec.rb b/spec/requests/garden_types_spec.rb index e541dc8e3..7ba8abdcd 100644 --- a/spec/requests/garden_types_spec.rb +++ b/spec/requests/garden_types_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe "GardenTypes", type: :request do +RSpec.describe "GardenTypes" do describe "GET /garden_types" do it "works! (now write some real specs)" do get garden_types_path diff --git a/spec/views/places/_map_attribution.html.haml_spec.rb b/spec/views/places/_map_attribution.html.haml_spec.rb index b52896bc2..d76f0fb1f 100644 --- a/spec/views/places/_map_attribution.html.haml_spec.rb +++ b/spec/views/places/_map_attribution.html.haml_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe "places/_map_attribution.html.haml", type: :view do +describe "places/_map_attribution.html.haml" do before do render end