Skip to content

Commit

Permalink
Fix an error for RSpecRails/HttpStatus
Browse files Browse the repository at this point in the history
Fix: #9
  • Loading branch information
ydah committed Mar 29, 2024
1 parent b141576 commit e09d445
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Master (Unreleased)

- Fix an error for `RSpecRails/HttpStatus`. ([@ydah])

## 2.28.1 (2024-03-29)

- Implicit dependency on RuboCop RSpec. Note that if you use rubocop-rspec_rails, you must also explicitly add rubocop-rspec to the Gemfile, because you are changing to an implicit dependency on RuboCop RSpec. ([@ydah])
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ gemspec

gem 'bump'
gem 'danger'
gem 'rack'
gem 'rake'
gem 'rspec', '~> 3.11'
gem 'rubocop-performance', '~> 1.7'
Expand Down
6 changes: 5 additions & 1 deletion lib/rubocop-rspec_rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
require 'yaml'

require 'rubocop'
require 'rubocop-rspec'

require 'rubocop/rspec/language/node_pattern'

require 'rubocop/rspec/language'

require_relative 'rubocop/rspec_rails/version'

require 'rubocop/cop/rspec/base'
require_relative 'rubocop/cop/rspec_rails_cops'

project_root = File.join(__dir__, '..')
Expand Down
8 changes: 2 additions & 6 deletions lib/rubocop/cop/rspec_rails_cops.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@

require_relative 'rspec_rails/avoid_setup_hook'
require_relative 'rspec_rails/have_http_status'
require_relative 'rspec_rails/negation_be_valid'
begin
require_relative 'rspec_rails/http_status'
rescue LoadError
# RSpecRails/HttpStatus cannot be loaded if rack/utils is unavailable.
end
require_relative 'rspec_rails/http_status'
require_relative 'rspec_rails/inferred_spec_type'
require_relative 'rspec_rails/minitest_assertions'
require_relative 'rspec_rails/negation_be_valid'
require_relative 'rspec_rails/travel_around'
1 change: 1 addition & 0 deletions rubocop-rspec_rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ Gem::Specification.new do |spec|
'rubygems_mfa_required' => 'true'
}

spec.add_runtime_dependency 'rack'
spec.add_runtime_dependency 'rubocop', '~> 1.40'
end
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ module SpecHelper

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'rubocop-rspec'
require 'rubocop-rspec_rails'

0 comments on commit e09d445

Please sign in to comment.