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
# REVISED TEST FILES | |
describe TwilioController, job: true do | |
before { @rentalrequest = FactoryGirl.create(:rental_request) } | |
it "enqueues a RoadRunner Twilio Alert job" do | |
get :alert, rentalrequest_id: @rentalrequest.id | |
RoadrunnerTwilioAlert.jobs.count.should == 1 # not sure what the right syntax is here? | |
end |
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
#Note, these results are the exact same whether or not I have the db gem installed and the config files or not. | |
#Either tell the job to sleep 3 sec before starting OR don't sleep and execute as normal both render the following errors | |
Failure/Error: click_button 'submit_request' | |
NoMethodError: | |
undefined method `signup' for nil:NilClass | |
# ./app/jobs/times_to_create.rb:12:in `block (2 levels) in perform' | |
# ./app/jobs/times_to_create.rb:8:in `each' | |
# ./app/jobs/times_to_create.rb:8:in `block in perform' |
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
#config/initializers/fist_of_fury.rb | |
# Ensure the jobs run only in a web server. | |
if defined?(Rails::Server) | |
FistOfFury.attack! do | |
# Jobs can be scheduled here. Example: | |
# SayHiJob.recurs { secondly(3) } | |
end | |
end |