Skip to content

Commit

Permalink
Fix rubocop-rspec errors, enabling to infer spec type from file location
Browse files Browse the repository at this point in the history
  • Loading branch information
mmx900 committed May 5, 2024
1 parent e5fb2c9 commit 0462ae3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spec/api/v1/restrooms_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe "Restrooms API", type: :request do
describe API::V1::Restrooms do
it 'sends a list of restrooms order by date descending' do
create_list(:restroom, 15)

Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/pages_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe PagesController, type: :controller do
describe PagesController do
it_behaves_like 'localized request', :index

it "#index" do
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/restrooms_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe RestroomsController, type: :controller do
describe RestroomsController do
it_behaves_like 'localized request', :index

it "#index" do
Expand Down
2 changes: 1 addition & 1 deletion spec/features/contacts_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe 'the contact process', type: :feature do
describe 'the contact process' do
it 'shows a generic contact when contact is not from restroom form' do
restroom = create(:restroom, name: "Mission Creek Cafe")

Expand Down
2 changes: 1 addition & 1 deletion spec/features/restrooms_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'spec_helper'

describe 'restrooms', type: :feature, js: true do
describe 'restrooms', :js do
describe 'submission' do
it 'adds a restroom when submitted' do
visit root_path
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
# instead of true.
config.use_transactional_fixtures = true

config.infer_spec_type_from_file_location!

# Run specs in random order to surface order dependencies. If you find an
# order dependency and want to debug it, you can fix the order by providing
# the seed, which is printed after each run.
Expand Down

0 comments on commit 0462ae3

Please sign in to comment.