Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This ensures that we can deploy most of the functionality in advance and switch over the banner content in the final deploy. As we want to be able to deploy just the content, the tests need to support a partial both with and without content. To do this, we override the view path to stub templates replacement. This is borrowed from rspec-rails’ `stub_template` method https://github.com/rspec/rspec-rails/blob/e8054a1cd03044f725030fe8315952 cf3799a395/lib/rspec/rails/example/view_example_group.rb#L86-L88
- Loading branch information
Showing
5 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module PromoBannerHelper | ||
def render_promo_banner | ||
render partial: "promo_banner" | ||
end | ||
end |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div id="homepage-promo-banner"> | ||
<div class="banner-message"> | ||
<p><strong>Some Title</strong> On some date something has happened. | ||
<a href="https://something.gov.uk" rel="external nofollow">More information<span class="visuallyhidden"> about things</span></a></p> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters