Skip to content

Commit

Permalink
try rails native time travel
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Jan 24, 2024
1 parent 7e4c198 commit fbe0a76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/features/comment_to_authority_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

describe "Give feedback" do
include Devise::Test::IntegrationHelpers
include ActiveSupport::Testing::TimeHelpers

# In order to affect the outcome of a development application
# As a citizen
Expand Down Expand Up @@ -60,7 +61,7 @@
it "renders a snapshot for a visual diff", js: true do
# Note that we're ensuring that the application has a static first_date_scraped and we freeze the current
# time so that the page should always have the same text on it
Timecop.freeze(Date.new(2023, 6, 1)) do
travel_to(Date.new(2023, 6, 1)) do
page.percy_snapshot("Application")
end
end
Expand Down

0 comments on commit fbe0a76

Please sign in to comment.