Skip to content

Commit

Permalink
Fix TimeWithZone#to_s(:rfc822) is deprecated
Browse files Browse the repository at this point in the history
When running bundle exec rspec, we are getting:

```
DEPRECATION WARNING: TimeWithZone#to_s(:rfc822) is deprecated. Please use TimeWithZone#to_fs(:rfc822) instead. (called from call at ~/upcase/spec/support/host_map.rb:7)
```

This commit resolves the issue by using `TimeWithZone#to_fs(:rfc822)`.
  • Loading branch information
smaboshe committed Sep 11, 2024
1 parent 630a885 commit 4a398aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/videos/_video.rss.builder
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ xml.item do
end
xml.guid video_url(video)
xml.link video_url(video)
xml.pubDate video.created_at.to_s(:rfc822)
xml.pubDate video.created_at.to_fs(:rfc822)
end
2 changes: 1 addition & 1 deletion spec/features/videos_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
.to eq(video_url(published_video))

expect(text_in(item, ".//pubDate"))
.to eq(published_video.created_at.to_s(:rfc822))
.to eq(published_video.created_at.to_fs(:rfc822))

expect(text_in(item, ".//description")).to match(/#{notes}/)
end
Expand Down

0 comments on commit 4a398aa

Please sign in to comment.