test/test_helper.rb
def assert_has_devolved_nations_component(text, nations = nil)
    within(".gem-c-devolved-nations") do
      assert page.has_text?(text)
      nations&.each do |nation|
        assert page.has_link?(nation[:text], href: nation[:alternative_url])
      end
    end
  end
# Make the Capybara DSL available in all integration tests
Make the Capybara DSL available in all integration tests
Make the Capybara DSL available in all integration tests
def assert_has_devolved_nations_component(text, nations = nil)
    within(".gem-c-devolved-nations") do
      assert page.has_text?(text)
      nations&.each do |nation|
        assert page.has_link?(nation[:text], href: nation[:alternative_url])
      end
    end
  end
def assert_has_devolved_nations_component ( text , nations = nil ) within ( ".gem-c-devolved-nations" ) do assert page . has_text? ( text ) nations &. each do | nation | assert page . has_link? ( nation [ :text ] , href : nation [ :alternative_url ] ) end end end
Make the Capybara DSL available in all integration tests
Make the Capybara DSL available in all integration tests
text
nations