Rails tests/RSpec travel_to - change current Time in test

Edit
equivalent
Public
ActiveSupport::Testing
RSpec
Rails




it do
  travel_to(2.days.ago) do
   visit time_travel_verification_path
   expect(page).to have_content('WOAH Time Travel!')
  end
end   

travel_to("2023-10-11") do
  article.processing!
  visit article_path(article)

  within("#activities-processing") do
    expect(page).to have_content("article launched on October 11th, 2023, and is currently processing.")
  end
end