require "rails_helper" RSpec.describe GovukDesignSystem::CheckboxesHelper, type: :helper do describe "#govukCheckboxes" do it "returns the correct HTML for the default example" do html = helper.govukCheckboxes({ idPrefix: "waste", name: "waste", fieldset: { legend: { text: "Which types of waste do you transport?", isPageHeading: true, classes: "govuk-fieldset__legend--l" } }, hint: { text: "Select all that apply." }, items: [ { value: "carcasses", text: "Waste from animal carcasses", disable_ghost: true }, { value: "mines", text: "Waste from mines or quarries", disable_ghost: true }, { value: "farm", text: "Farm or agricultural waste", disable_ghost: true } ] }) expect(html).to match_html(<<~HTML)