This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect do | |
time_travel_to(start_date-7.days) { | |
EventReminder.new.perform | |
} | |
end.to change { Sidekiq::Extensions::DelayedMailer.jobs.size }.by(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def alert_class(key) | |
case key | |
when 'notice' | |
'notice-class foo bar' | |
when 'error' | |
'error bar' | |
end | |
enb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
movie = FFMPEG::Movie.new(video_url) | |
duration = (movie.duration / 2).floor | |
movie.screenshot("#{thumb_url}.jpg", seek_time: duration) |
NewerOlder