Skip to content

Commit

Permalink
Merge pull request #317 from DFE-Digital/dependabot/bundler/rubocop-g…
Browse files Browse the repository at this point in the history
…ovuk-tw-4.1.0

Update rubocop-govuk requirement from ~> 4.0.0 to ~> 4.1.0
  • Loading branch information
peteryates committed Oct 4, 2021
2 parents 9b0a456 + df3503b commit fc782aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion govuk_design_system_formbuilder.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Gem::Specification.new do |s|
s.add_dependency(*VersionFormatter.new(lib, rails_version, exact_rails_version).to_a)
end

s.add_development_dependency("rubocop-govuk", "~> 4.0.0")
s.add_development_dependency("rubocop-govuk", "~> 4.1.0")
s.add_development_dependency("pry", "~> 0.13.0")
s.add_development_dependency("pry-byebug", "~> 3.9", ">= 3.9.0")
s.add_development_dependency("rspec-html-matchers", "~> 0")
Expand Down
16 changes: 8 additions & 8 deletions spec/support/matchers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,33 @@
!nokogiri_fragment.xpath(%(./*[contains(concat(" ", @class, " "), " #{class_name} ")])).empty?
end

#:nocov:
# :nocov:
failure_message do |nokogiri_fragment|
"expected that #{class_name} would be a class of a root element in fragment: #{nokogiri_fragment}"
end
#:nocov:
# :nocov:
end

RSpec::Matchers.define(:have_no_leading_or_trailing_spaces) do
match do |string|
[string.start_with?(' '), string.end_with?(' ')].none?
end

#:nocov:
# :nocov:
failure_message do |failing_attribute|
%('#{failing_attribute}' has leading or trailing spaces)
end
#:nocov:
# :nocov:
end

RSpec::Matchers.define(:have_no_double_spaces) do
match { |string| string !~ %r(\s{2}) }

#:nocov:
# :nocov:
failure_message do |failing_attribute|
%('#{failing_attribute}' has double spaces)
end
#:nocov:
# :nocov:
end

RSpec::Matchers.define(:render_an_error_summary) do
Expand All @@ -50,7 +50,7 @@
end
end

#:nocov:
# :nocov:
description do
if @count.present?
"render an error summary with #{@count} errors"
Expand All @@ -64,7 +64,7 @@
end

chain(:errors) {}
#:nocov:
# :nocov:
end

RSpec::Matchers.define(:contain_element) do |selector|
Expand Down

0 comments on commit fc782aa

Please sign in to comment.