Skip to content

Commit

Permalink
Include ActionView::Context in the spec
Browse files Browse the repository at this point in the history
The include shouldn't have ever been in the helper, Rails will already
have it
  • Loading branch information
peteryates committed Jul 7, 2021
1 parent 6729080 commit 91f8ffc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 0 additions & 3 deletions app/helpers/govuk_skip_link_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
module GovukSkipLinkHelper
include ActionView::Helpers::UrlHelper
include ActionView::Context

def govuk_skip_link(text: 'Skip to main content', href: '#main-content', classes: [], **html_attributes, &block)
link_classes = Array.wrap(classes).append('govuk-skip-link')

Expand Down
1 change: 1 addition & 0 deletions spec/helpers/govuk_skip_link_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require 'spec_helper'

RSpec.describe(GovukSkipLinkHelper, type: 'helper') do
include ActionView::Context
include ActionView::Helpers::UrlHelper

let(:custom_link_text) { 'Get straight to the important stuff' }
Expand Down

0 comments on commit 91f8ffc

Please sign in to comment.