Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run tests with warnings enabled #1462

Merged
merged 3 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@

scope :frontend, controller: :frontends, defaults: { version: GoodJob::VERSION.tr(".", "-") } do
get "modules/:version/:id", action: :module, as: :frontend_module, constraints: { format: 'js' }
get "static/:version/:id", action: :static, as: :frontend_static, constraints: { format: %w[css js svg] }
get "static/:version/:id", action: :static, as: :frontend_static
end
end
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
mocks.verify_partial_doubles = true
end

config.warnings = true

# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
# have no way to turn it off -- the option exists only for backwards
# compatibility in RSpec 3). It causes shared context metadata to be
Expand Down
2 changes: 2 additions & 0 deletions spec/support/reset_rails_queue_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ module ActiveJob
module TestHelper
# Avoid calling #descendants because JRuby has trouble with it
# https://github.com/jruby/jruby/issues/6896
silence_redefinition_of_method :queue_adapter_changed_jobs
def queue_adapter_changed_jobs
[]
end

module TestQueueAdapter
module ClassMethods
silence_redefinition_of_method :queue_adapter
def queue_adapter # rubocop:disable Lint/UselessMethodDefinition
super
end
Expand Down
1 change: 1 addition & 0 deletions spec/support/selenium.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
module ActionDispatch
module SystemTesting
class Browser # :nodoc:
silence_redefinition_of_method :resolve_driver_path
def resolve_driver_path(namespace)
# The path method has been deprecated in 4.20.0
namespace::Service.driver_path = if Gem::Version.new(::Selenium::WebDriver::VERSION) >= Gem::Version.new("4.20.0")
Expand Down