Skip to content

Commit

Permalink
Merge pull request #306 from alphagov/dependabot/bundler/rubocop-govu…
Browse files Browse the repository at this point in the history
…k-eq-4.12.0

Update rubocop-govuk requirement from = 4.11.0 to = 4.12.0
  • Loading branch information
catalinailie authored Jul 31, 2023
2 parents ef1d9f7 + a9e0c80 commit 13453a3
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion slimmer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "rack-test", "~> 2"
s.add_development_dependency "rails", "~> 7"
s.add_development_dependency "rake"
s.add_development_dependency "rubocop-govuk", "4.11.0"
s.add_development_dependency "rubocop-govuk", "4.12.0"
s.add_development_dependency "webmock", "~> 3.8"

s.files = Dir[
Expand Down
2 changes: 1 addition & 1 deletion test/headers_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require_relative "test_helper"
require "slimmer/headers"

class HeadersTest < MiniTest::Test
class HeadersTest < Minitest::Test
include Slimmer::Headers
attr_accessor :headers

Expand Down
2 changes: 1 addition & 1 deletion test/processors/accounts_shower_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require_relative "../test_helper"

class AccountsShowerTest < MiniTest::Test
class AccountsShowerTest < Minitest::Test
def setup
super
@template = as_nokogiri %(
Expand Down
2 changes: 1 addition & 1 deletion test/processors/body_inserter_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"

class BodyInserterTest < MiniTest::Test
class BodyInserterTest < Minitest::Test
def test_should_replace_contents_of_wrapper_in_template
template = as_nokogiri %(
<html><body><div><div id="wrapper"></div></div></body></html>
Expand Down
2 changes: 1 addition & 1 deletion test/processors/feedback_url_swapper_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"

class FeedbackURLSwapperTest < MiniTest::Test
class FeedbackURLSwapperTest < Minitest::Test
def test_should_replace_input_url_values_in_gem_layout
template = as_nokogiri %(
<html>
Expand Down
2 changes: 1 addition & 1 deletion test/processors/header_context_inserter_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"

class HeaderContextInserterTest < MiniTest::Test
class HeaderContextInserterTest < Minitest::Test
def test_should_replace_contents_of_header_context_in_template
template = as_nokogiri %(
<html><body><div><div class="header-context"></div></div></body></html>
Expand Down
2 changes: 1 addition & 1 deletion test/processors/inside_header_inserter_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require_relative "../test_helper"

class InsideHeaderInserterTest < MiniTest::Test
class InsideHeaderInserterTest < Minitest::Test
def test_should_insert_into_header
source = as_nokogiri %(
<html>
Expand Down
2 changes: 1 addition & 1 deletion test/processors/nonce_inserter_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"

class NonceInserterTest < MiniTest::Test
class NonceInserterTest < Minitest::Test
def test_decorates_an_inline_script_element
request_env = Rack::MockRequest.env_for("https://new-example.com/new_path")
request_env[ActionDispatch::ContentSecurityPolicy::Request::NONCE_GENERATOR] = ->(_) { "123456" }
Expand Down
2 changes: 1 addition & 1 deletion test/processors/search_remover_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require_relative "../test_helper"

class SearchRemoverTest < MiniTest::Test
class SearchRemoverTest < Minitest::Test
def setup
super
@template = as_nokogiri %(
Expand Down
2 changes: 1 addition & 1 deletion test/processors/tag_mover_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require_relative "../test_helper"

class TagMoverTest < MiniTest::Test
class TagMoverTest < Minitest::Test
def setup
super
@source = as_nokogiri %(
Expand Down
6 changes: 3 additions & 3 deletions test/railtie_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
it "gets the app name from env when the app name is set in the environment" do
ClimateControl.modify(GOVUK_APP_NAME: "TestApp1") do
app = Class.new(Rails::Application)
middleware = MiniTest::Mock.new
middleware = Minitest::Mock.new
middleware.expect :use, nil, [Slimmer::App, { app_name: "TestApp1" }]

app.stub :middleware, middleware do
Expand All @@ -17,10 +17,10 @@
it "gets the app name from module_parent_name when the app name is not set in the environment" do
ClimateControl.modify(GOVUK_APP_NAME: nil) do
app = Class.new(Rails::Application)
klass = MiniTest::Mock.new
klass = Minitest::Mock.new
klass.expect :module_parent_name, "TestApp2"

middleware = MiniTest::Mock.new
middleware = Minitest::Mock.new
middleware.expect :use, nil, [Slimmer::App, { app_name: "TestApp2" }]

app.stub :class, klass do
Expand Down
4 changes: 2 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require "json"
require "logger"

MiniTest::Test.class_eval do
Minitest::Test.class_eval do
def as_nokogiri(html_string)
Nokogiri::HTML.parse(html_string.strip)
end
Expand Down Expand Up @@ -36,7 +36,7 @@ def allowing_real_web_connections
WebMock.disable_net_connect!
Slimmer.cache = Slimmer::NoCache.new

class SlimmerIntegrationTest < MiniTest::Test
class SlimmerIntegrationTest < Minitest::Test
include Rack::Test::Methods

# given_response can either be called from a setup method, or in the class scope.
Expand Down
2 changes: 1 addition & 1 deletion test/test_template_dependency_on_static_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "test_helper"

class TestTemplateDependencyOnStaticTest < MiniTest::Test
class TestTemplateDependencyOnStaticTest < Minitest::Test
def test_scripts_on_static_referenced_in_test_templates_exist
template_path = File.dirname(__FILE__).gsub("/test", "/lib/slimmer/test_templates")
Dir.foreach(template_path) do |template_file_name|
Expand Down
2 changes: 1 addition & 1 deletion test/typical_usage_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def test_should_strip_slimmer_headers_even_when_skipping_slimmer

# Not using the SlimmerIntergrationTest class for this integration test
# as it requires a custom rack request
class NonceInsertingTest < MiniTest::Test
class NonceInsertingTest < Minitest::Test
def test_should_insert_nonces_into_templates_for_inline_script_elements
stub_request(:get, "http://template.local/templates/gem_layout.html.erb")
.to_return(body: %{<html><body><script>document.write('hello')</script><div id="wrapper"></div></body></html>})
Expand Down

0 comments on commit 13453a3

Please sign in to comment.